Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
The test included MCQ questions from SQL, Linux Commands, C/C++ programming, Logical Reasoning, Aptitude questions. The other section was the coding round, where 2 SQL queries and 2 coding questions were there.


Approach :
1) Convert all 0's to -1's .
2) Now , the questions boils down to finding the number of subarrays with sum=0
3) This is a very standard problem which can be solved in O(N) using Hashing .
4) Maintain a Hash Map which keeps a track of all the prefix sums encountered so far
5) Maintain an answer variable and at each step do : ans+=map[prefixSum]
6) Finally return ans



1. The integers x,y and z might not be distinct , but they should be present at different locations in the array i.e if a[i] = x, a[j] = y and a[k] = z, then i,j and k should be pairwise distinct.
2. The integers a,b and c can be present in any order in the given array.
Approach :
1) I solved it in O(N^2) approach .
2) Sort the array
3) Initially map all the elements of the array to their index in a Hash Map or a Hash Set
3) Now , run 2 for loops and for every x^2 + y^2 ,check if there exists a z^2 s.t x^2+y^2=z^2 and the index of z^2 is different than both the indices of x and y
This was a standard DSA round where I was asked to solve 2 questions and also code it in a production ready manner . At the end I was also asked some questions related to Linux and SQL . I was tested on some basic commands of Linux .



Consider ‘S’ = ‘abba’, all the possible substrings are [ ‘a’, ‘ab’, ‘abb’, 'abba', 'b', ‘ba’, 'bb', ‘bba’ ] out of which [ ‘a’, ‘abba’, 'b’, 'bb'] are palindromic substrings.
I solved it using DP as I was able to figure out what my dp table would store and the dp transition state .
Approach :
1) Create a 2-D dp boolean vector(with all false initially) where dp[i][j] states whether s[i...j] is a palindrome or not .
2) Base Case : For every i from 0 to n-1 fill dp[i][i]=1 ( as a single character is always a palindrome )and increment the counter where counter=0 initially
3) Now, run 2 loops first one from i=n-1 to i=0 (i.e., tarverse from the back of the string) and the second one from j=i+1 to n .
4) For every s[i]==s[j] , check if(j-i==1 i.e., if s[i] and s[ j] are two consecutive same letters) or if(dp[i+1][j-1]==1 or not i.e., if the string s[i+1,....j-1] is palindrome or not .
5) Because if the string s[i+1,....j-1] is a palindrome and s[i]==s[j] then s[i] and s[j] can be appended at the starting and the ending position of s[i+1,...j-1] and s[i...j] will then be a palindrome , so mark dp[i][j]=1 and increment the counter
6) Finally return the counter
TC : O(N^2) where N=length of the string s
SC : O(N^2)



Input:
'a' = 8, 'b' = 5
Output:
5 8
Explanation:
Initially, the value of 'a' and 'b' is 8 and 5, respectively.
After swapping, the value of 'a' is 5, and the value of 'b' is 8.
This was a preety straight forward question and I was asked to directly code it to check my proficiency w.r.t C++ pointers.
//CALL BY ADDRESS
void swap(int *a , int *b)
{
int tmp;
tmp=*a;
*a=*b;
*b=tmp;
}
int main()
{
int a=10;
int b=19;
swap(&a,&b);
cout< return 0;
}
//CALL BY REFERENCE
void swap(int &a , int &b)
{
int tmp;
tmp=a;
a=b;
b=tmp;
}
int main()
{
int a=10;
int b=19;
swap(a,b);
cout< return 0;
}
Main difference b/w "CALL BY ADDRESS" AND "CALL BY REFERENCE" is :
1) CALL BY ADDRESS : Here the address of the actual arguments are copied to the formal parameters.
CALL BY REFERENCE : Here the reference of an argument is copied into the formal parameter.
2) CALL BY ADDRESS : Memory is allocated to both actual and formal arguments.
CALL BY REFERENCE : Memory is allocated only for actual arguments and formal parameters share
that memory
1) Write command in the terminal to check the kernel version .
2) Check the system hardware in Linux .
3) What are the contents of /etc
1) uname –a : is a command to check kernel version of Linux OS.
2) cat /proc/cpuinfo
3) /etc: – It contain all configuration file and directory used for server.
What is meant by normalization and denormalization?
NORMALIZATION :
1) Normalization is a process of reducing redundancy by organizing the data into multiple tables.
2) Normalization leads to better usage of disk spaces and makes it easier to maintain the integrity of the database.
DENORMALIZATION :
1) Denormalization is the reverse process of normalization as it combines the tables which have been normalized into a single table so that data retrieval becomes faster.
2) JOIN operation allows us to create a denormalized form of the data by reversing the normalization.
This was a DS/Algo + Core round where I was asked questions related to DBMS , SQL queries and Linux Commands . The first question was of DSA and I was able to code it preety fast . I was also asked to execute some SQL queries on my laptop.
Overall , this round went good according to my opinion.



Anagrams are defined as words or names that can be formed by rearranging the letters of another word. Such as "spar" can be formed by rearranging letters of "rasp". Hence, "spar" and "rasp" are anagrams.
'triangle' and 'integral'
'listen' and 'silent'
Since it is a binary problem, there is no partial marking. Marks will only be awarded if you get all the test cases correct.
I initally solved it using sorting i.e, I sorted both the strings and compared if they are equal or not . I was later asked to give an even more optimised approach where I do not have to use Sorting . So I solved it using Hashing or Frequency based Approach .
Steps :
1) Create two freq[26] arrays freq1[26] and freq2[26] which stores the corresponding frequency of the characters in both the strings s1 and s2 .
2) If s1 and s2 are anagrams then for every i from 0 to 25 I should have freq1[i]==freq2[i] , If this condition is not met then s1 and s2 are not anagrams .
TC : O(N) where N=length of both the strings
SC : O(26)=O(1) constant space
Edge Case : Initially check the length of both the strings s1 and s2, if they are not equal simply return false at the beginning only .
Delete Duplicate Emails
Steps :
1) Join the table with itself on the Email column .
2) Then find the bigger id having same email address with other records.
3) Add a new condition to the WHERE clause. As we already got the records to be deleted, we can alter this statement to DELETE in the end.
SQL Query :
DELETE FROM Person WHERE Id NOT IN
(SELECT * FROM(
SELECT MIN(Id) FROM Person GROUP BY Email) as p);
select * from person;
Difference between the DELETE and TRUNCATE command in a DBMS.
Answer :
DELETE command:
1) This command is needed to delete rows from a table based on the condition provided by the WHERE clause.
2) It can be rolled back if required.
3) It maintains a log to lock the row of the table before deleting it and hence it’s slow.
TRUNCATE command:
1) This command is needed to remove complete data from a table in a database. It is like a DELETE command which has no WHERE clause.
2) It removes complete data from a table in a database.
3) It can be rolled back even if required.
4) It doesn’t maintain a log and deletes the whole table at once and hence it’s fast.
This was a typical HR round with some standard Behavioral questions .
Tell me something not there in your resume.
If you get this question, it's an opportunity to choose the most compelling information to share that is not obvious from your resume.
Example :
Strength -> I believe that my greatest strength is the ability to solve problems quickly and efficiently, which makes me unique from others.
Handle Pressure -> I enjoy working under pressure because I believe it helps me grow and become more efficient .
Tip : Emphasize why you were inspired to apply for the job. You can also explain that you are willing to invest a great deal of energy if hired.
These are generally very open ended questions and are asked to test how quick wit a candidate is. So there is nothing to worry about if you have a good cammand over your communication skills and you are able to propagate your thoughts well to the interviewer
Why do you want to work at amdocs?
a) It is an IT company that caters to the telecommunication domain. The business involved in the telecommunication domain is interesting and can widen your chances of switching into various fields be it in software, hardware or networking profiles. Also, Amdocs carries a good brand name in its domain.
b) Amdocs employees get to enjoy a positive and happy work environment.
c) It is truly an employee friendly organisation.I say this because Amdocs policies are employee oriented above anything else.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?