Amdocs interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Amdocs
upvote
share-icon
4 rounds | 11 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 Months
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

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.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

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.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration120 Minutes
Interview date5 Jun 2019
Coding problem2

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.

1. Subarray with equal occurrences

Moderate
15m average time
80% success
0/80
Asked in companies
AmazonAmdocs

You have been given an array/list ARR of length N consisting of 0s and 1s only. Your task is to find the number of subarrays(non-empty) in which the number of 0s and 1s are equal.

Problem approach

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

Try solving now

2. Pythagorean Triplets

Moderate
35m average time
70% success
0/80
Asked in companies
AmazonOYOErnst & Young (EY)

You are given an array of n integers (a1, a2,....,an), you need to find if the array contains a pythagorean triplet or not.

An array is said to have a pythagorean triplet if there exists three integers x,y and z in the array such that x^2 + y^2 = z^2.

Note
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.
Problem approach

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

Try solving now
02
Round
Medium
Face to Face
Duration50 Minutes
Interview date5 Jun 2019
Coding problem4

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 .

1. Palindromic Substrings

Moderate
20m average time
80% success
0/80
Asked in companies
OracleTower Research CapitalAmdocs

You are given a string ‘S’. Your task is to return all distinct palindromic substrings of the given string in alphabetical order.

A string is said to be palindrome if the reverse of the string is the same as the string itself.

For Example:
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.
Problem approach

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)

Try solving now

2. Swap Two Numbers

Easy
10m average time
0/40
Asked in companies
CIS - Cyber InfrastructureErnst & Young (EY)Cybage Software

You are given two numbers 'a' and 'b' as input.


You must swap the values of 'a' and 'b'.


For Example:
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.
Problem approach

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

Try solving now

3. OS Questions

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

Problem approach

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.

4. DBMS Question

What is meant by normalization and denormalization?

Problem approach

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.

03
Round
Medium
Face to Face
Duration60 Minutes
Interview date5 Jun 2019
Coding problem3

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.

1. Anagram Pairs

Moderate
30m average time
60% success
0/80
Asked in companies
AdobeThought WorksHSBC

You are given two strings 'str1' and 'str1'.


You have to tell whether these strings form an anagram pair or not.


The strings form an anagram pair if the letters of one string can be rearranged to form another string.

Pre-requisites:

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. 

Other examples include:

'triangle' and 'integral'
'listen' and 'silent'
Note:
Since it is a binary problem, there is no partial marking. Marks will only be awarded if you get all the test cases correct. 
Problem approach

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 .

Try solving now

2. SQL Question

Delete Duplicate Emails

Problem approach

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;

3. DBMS Question

Difference between the DELETE and TRUNCATE command in a DBMS.

Problem approach

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.

04
Round
Easy
HR Round
Duration30 Minutes
Interview date5 Jun 2019
Coding problem2

This was a typical HR round with some standard Behavioral questions .

1. Basic HR Question

Tell me something not there in your resume.

Problem approach

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

2. Basic HR Question

Why do you want to work at amdocs?

Problem approach

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

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 4 problems
Interviewed by Amdocs
2058 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 2 problems
Interviewed by Amdocs
1308 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 4 problems
Interviewed by Amdocs
1906 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Amdocs
1410 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115096 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58237 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35146 views
7 comments
0 upvotes