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

Associate Software Engineer

Amdocs
upvote
share-icon
3 rounds | 10 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 Months
Topics: Data Structures, Algorithms, Unix, C, 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 Test
Duration90 Minutes
Interview date4 Apr 2015
Coding problem2

This was an online coding round where we had 2 questions to solve under 90 minutes . Both the questions were of easy to medium difficulty .

1. Nth Fibonacci Number

Easy
0/40
Asked in companies
SAP LabsHCL TechnologiesWalmart

The n-th term of Fibonacci series F(n), where F(n) is a function, is calculated using the following formula -

    F(n) = F(n - 1) + F(n - 2), 
    Where, F(1) = 1, F(2) = 1


Provided 'n' you have to find out the n-th Fibonacci Number. Handle edges cases like when 'n' = 1 or 'n' = 2 by using conditionals like if else and return what's expected.

"Indexing is start from 1"


Example :
Input: 6

Output: 8

Explanation: The number is ‘6’ so we have to find the “6th” Fibonacci number.
So by using the given formula of the Fibonacci series, we get the series:    
[ 1, 1, 2, 3, 5, 8, 13, 21]
So the “6th” element is “8” hence we get the output.
Problem approach

This problem is a simple recursive problem. But time complexity of simple recursive calls is exponential. In O(log(n)) this problem can be solved using a simple trick.

If n is even then k = n/2:
F(n) = [2*F(k-1) + F(k)]*F(k)

If n is odd then k = (n + 1)/2
F(n) = F(k)*F(k) + F(k-1)*F(k-1)

This method will solve this question in O(log(n)).

Try solving now

2. K - Sum Path In A Binary Tree

Moderate
35m average time
65% success
0/80
Asked in companies
Thought WorksWalmartFacebook

You are given a binary tree in which each node contains an integer value and a number ‘K’. Your task is to print every path of the binary tree with the sum of nodes in the path as ‘K’.

Note:

1. The path does not need to start or end at the root or a leaf, but it must go downwards (traveling only from parent nodes to child nodes).

2. Output the paths in the order in which they exist in the tree from left to right. Example: In the below example, path {1,3} is followed by {3,1} and so on.

Example:

For K = 4 and tree given below:

alt text

The possible paths are:
1 3
3 1
-1 4 1
4 
-1 5

The sum of values of nodes of each of the above-mentioned paths gives a sum of 4.
Problem approach

The idea is simple: along the path, record all prefix sums in a hash table. For current prefix sum x, check if (x - target) appears in the hash table.

Steps :
1) We will be using a unordered map which will be filled with various path sum.
2) For every node we will check if current sum and root’s value equal to k or not. If the sum equals to k then increment the required answer by one.
3) Then we will add all those path sum in map which differs from current sum+root->data value by a constant integer k.
4) Then we will be inserting the current sum + root->data value in the map.
5) We will recursively check for left and right subtrees of current root
6) After the right subtree is also traversed we will remove the current sum + root->data value from the map so that it is not taken into consideration in further traversals of other nodes other than the current root’s.

Try solving now
02
Round
Medium
Face to Face
Duration60 Minutes
Interview date6 Apr 2015
Coding problem7

This was a standard DSA round where I was asked to solve 1 question and also code it in a production ready manner . I was also asked 2 puzzles in this round to check my problem solving skills . This round ended with some basic concepts from DBMS and I was also asked some queries related to SQL .

1. Reverse Stack Using Recursion

Easy
21m average time
80% success
0/40
Asked in companies
MicrosoftIBMRazorpay

Reverse a given stack of 'N' integers using recursion. You are required to make changes in the input parameter itself.


Note: You are not allowed to use any extra space other than the internal stack space used due to recursion.


Example:
Input: [1,2,3,4,5] 
Output: [5,4,3,2,1]

add image

Problem approach

Algorithm :

1) ReverseStack(stack)
i) If the stack is empty, then return
ii) Pop the top element from the stack as top
iii) Reverse the remaining elements in the stack, call reverseStack(stack) method
iv) Insert the top element to the bottom of the stack, call InsertAtBottom(stack, top) method
2) InsertAtBottom(stack, ele)
i) If the stack is empty, push ele to stack, return
ii) Pop the top element from the stack as top
iii) Insert the ele to the bottom of the stack, call InsertAtBottom(stack, ele) method
iv) Push top to the stack.

TC : O(N^2) , where N=total number of elements in the given stack
SC : O(N)

Try solving now

2. Puzzle

Find the fastest 3 horses

Problem approach

Steps : 

1) Make group of 5 horses and run 5 races. 

2) Suppose five groups are a,b,c,d,e and next alphabet is its individual rank in tis group(of 5 horses).For eg. d3 means horse in group d and has rank 3rd in his group. [ 5 RACES DONE ]
a1 b1 c1 d1 e1
a2 b2 c2 d2 e2
a3 b3 c3 d3 e3
a4 b4 c4 d4 e4
a5 b5 c5 d5 e5

3) Now make a race of (a1,b1,c1,d1,e1).[RACE 6 DONE] suppose result is a1>b1>c1>d1>e1
which implies a1 must be FIRST.
b1 and c1 MAY BE(but not must be) 2nd and 3rd.
FOR II position, horse will be either b1 or a2
(we have to find top 3 horse therefore we choose horses b1,b2,a2,a3,c1 do racing among them [RACE 7 DONE].

The only possibilities are :
c1 may be third
b1 may be second or third
b2 may be third
a2 may be second or third
a3 may be third

The final result will give ANSWER. suppose result is a2>a3>b1>c1>b2
then answer is a1,a2,a3,b1,c1.

HENCE ANSWER is 7 RACES

3. Puzzle

Measure 4L using 3L and 5L cans .

Problem approach

Steps :
Let's call 5L jar as X and 3L jar as Y.

1) We'll take the first jar, i.e, X. Fill X completely.
2) Then empty the X content in Y. We are left with 2 L in the X.
3) Now we will empty the Y jar and then Fill 2L from X into Y. We are left with 0L in X and 2L in Y.
4) Now again we will fill X with 5L and then empty till Y gets full.
5) As Y is already full with 2L from previous operation so it can only accomodate 1L now from X. So when
Y jar is full automatically we will have 4L left in X. This is how we will calculate 4L

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.

5. DBMS Question

Difference between Primary key and Unique key

Problem approach

Answer :

Primary Key : Used to serve as a unique identifier for each row in a table.
Unique Key : Uniquely determines a row which isn’t primary key.

Key Differences Between Primary key and Unique key: 

1) Primary key will not accept NULL values whereas Unique key can accept NULL values.

2) A table can have only one primary key whereas there can be multiple unique key on a table.

3) A Clustered index automatically created when a primary key is defined whereas Unique key generates the non-clustered index.

6. DBMS Question

Explain Left Outer Join and Right Outer Join .

Problem approach

Answer : 

LEFT JOIN : 
The LEFT JOIN or the LEFT OUTER JOIN returns all the records from the left table and also those records which satisfy a condition from the right table. Also, for the records having no matching values in the right table, the output or the result-set will contain the NULL values.

Syntax:
SELECT Table1.Column1,Table1.Column2,Table2.Column1,....
FROM Table1
LEFT JOIN Table2
ON Table1.MatchingColumnName = Table2.MatchingColumnName;

RIGHT JOIN : 
The RIGHT JOIN or the RIGHT OUTER JOIN returns all the records from the right table and also those records which satisfy a condition from the left table. Also, for the records having no matching values in the left table, the output or the result-set will contain the NULL values.

Syntax:
SELECT Table1.Column1,Table1.Column2,Table2.Column1,....
FROM Table1
RIGHT JOIN Table2
ON Table1.MatchingColumnName = Table2.MatchingColumnName;

7. DBMS Question

Second Highest Salary in a Table

Problem approach

Approach : 
Sort the distinct salary in descend order and then utilize the LIMIT clause to get the second highest salary.


SQL Query :

SELECT DISTINCT Salary
FROM Employee
ORDER BY Salary DESC
LIMIT 1 OFFSET 1;

03
Round
Easy
HR Round
Duration30 Minutes
Interview date6 Apr 2015
Coding problem1

This was a typical HR round with some standard Behavioral questions like my interests, weaknesses, strengths, family background, why Amdocs, CEO of Amdocs etc.

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

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
Associate Software Engineer
3 rounds | 10 problems
Interviewed by Amdocs
2409 views
0 comments
0 upvotes
company logo
Associate Software Engineer
2 rounds | 2 problems
Interviewed by Amdocs
1198 views
0 comments
0 upvotes
company logo
Associate Software Engineer
3 rounds | 4 problems
Interviewed by Amdocs
1064 views
1 comments
0 upvotes
company logo
Associate Software Engineer
4 rounds | 6 problems
Interviewed by Amdocs
1268 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Associate Software Engineer
3 rounds | 5 problems
Interviewed by Optum
2175 views
0 comments
0 upvotes
company logo
Associate Software Engineer
3 rounds | 5 problems
Interviewed by SAP Labs
1388 views
0 comments
0 upvotes