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 date17 May 2021
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. 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
AmazonFlipkartOYO

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
4) 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
Video Call
Duration70 Minutes
Interview date17 May 2021
Coding problem7

I was asked to solve 3 preety basic DSA questions in this round and discuss their respective time complexities and then we moved onto OOPS where the interviewer asked me some questions related to JAVA as well as C as I had mentioned both of them in my Resume . At the end , I was asked to write a simple SQL query to join two tables . Overall this round was preety intense and I tried to give my best .

1. Check If The String Is A Palindrome

Easy
10m average time
90% success
0/40
Asked in companies
InfosysCognizantSprinklr

You are given a string 'S'. Your task is to check whether the string is palindrome or not. For checking palindrome, consider alphabets and numbers only and ignore the symbols and whitespaces.

Note :

String 'S' is NOT case sensitive.

Example :

Let S = “c1 O$d@eeD o1c”.
If we ignore the special characters, whitespaces and convert all uppercase letters to lowercase, we get S = “c1odeedo1c”, which is a palindrome. Hence, the given string is also a palindrome.
Problem approach

Approach 1 :
1) Initialise a string named rev with the given string .
2) Reverse the string rev.
3) Now, if s is a palindrome then we would have rev==s , return true if rev==s and false otherwise

TC : O(N) where N=length of the string
SC : O(1)

Approach 2(Using Two Pointers) :
1) Keep pointer i=0 and j=n-1 where n=length of the string
2) Run a loop till i<=j and check if s[i]==s[j] for the condition of palindrome
3) If at any point s[i]!=s[j] then simply return false from the loop
4) Else return true after the end of the loop.

TC : O(N)
SC : O(1)

Try solving now

2. Fibonacci Number

Easy
20m average time
80% success
0/40
Asked in companies
SnapdealTwitterAmazon

You are given an integer, all you have to do is to find whether this number is a Fibonacci number or not.

Fn is said to be a Fibonacci sequence such that each number in Fn is the sum of its two preceding numbers, starting with 0 and 1.

Fn = F(n-1) + F(n-2)

fn is said to be a Fibonacci number if it is a part of the Fn/Fibonacci sequence.

Problem approach

Approach :
Using Recursion : 
1) Create a recursive function (int fib(int n) ) which takes the number of terms n of the Fibonacci Series
2) Base Case : if(n<=1) return n;
3) Recurrence Relation : fib(n)=fib(n-1)+fib(n-2)
4) Optimise the above code using memoisation i.e., if(dp[n]!=0)return dp[n] and fianlly store the answer into dp[n]
5) Traverse the dp array and print the output.

TC : O(n)
SC : O(n)

Without using Recursion :
1) Maintain two variables a=0,b=1
2) Print a and b , the first two terms of the Fibonacci Series
3) Traverse the loop from 2 to n and make c=a+b , a=b b=c 
4) Print c at every step from 2 to n .

TC : O(n)
SC : O(1)

Try solving now

3. All prime numbers

Moderate
0/80
Asked in companies
Tata Consultancy Services (TCS)HackerEarthBarclays

Given an integer N, print all the prime numbers that lie in the range 2 to N (both inclusive).

Problem approach

Approach 1 (Without using Sieve of Eratosthenes) : 
1) For every number from 2 to n check if is prime or not .
2) The check prime function which checks if a number is prime or not can be implemented in O(N^1/2) complexity by running a loop from i= 2 toi= N^1/2 and then checking if N%i==0 or not , if N%i==0 simply return false else return true

TC : O(N^3/2)
SC : O(1)

Approach 2 (Using Sieve of Eratosthenes) : 
1) Initilialise a boolean prime array of size n+1 where prime[i] denotes if i is a prime number or not.
2) Run a loop from i=2 to i=N^1/2.
3) For every i if prime[i] is true, again run a loop from j=i to j<=n where j increases by i every time (j+=i) , this loops marks all the multiples of i as false in the prime array
4) Finally output the prime array where prime[i]==true.

TC : O(N*log(log(N)))
SC : O(N)

Try solving now

4. OOPS Question

What is Garbage collector in JAVA?

Problem approach

Answer :

1) Garbage Collection in Java is a process by which the programs perform memory management automatically.

2) The Garbage Collector(GC) finds the unused objects and deletes them to reclaim the memory. 

3) In Java, dynamic memory allocation of objects is achieved using the new operator that uses some memory and the memory remains allocated until there are references for the use of the object.

4) When there are no references to an object, it is assumed to be no longer needed, and the memory, occupied by the object can be reclaimed.

5) There is no explicit need to destroy an object as Java handles the de-allocation automatically.

The technique that accomplishes this is known as Garbage Collection. Programs that do not de-allocate memory can eventually crash when there is no memory left in the system to allocate. These programs are said to have memory leaks.

Garbage collection in Java happens automatically during the lifetime of the program, eliminating the need to de- allocate memory and thereby avoiding memory leaks.

In C language, it is the programmer’s responsibility to de-allocate memory allocated dynamically using free() function.

This is where Java memory management leads.

5. OOPS Question

What is Static variable in C ?

Problem approach

Answer :

1) Static variables are initialized only once. 
2) The compiler persists with the variable till the end of the program. 
3) Static variables can be defined inside or outside the function. 
4) They are local to the block. 
5) The default value of static variables is zero. 
6) The static variables are alive till the execution of the program.

Here is the syntax of static variables in C language,

static datatype variable_name = value;

Here,
datatype − The datatype of variable like int, char, float etc.
variable_name − This is the name of variable given by user.
value − Any value to initialize the variable. By default, it is zero.

6. OOPS Question

Explain Singleton Class in Java

Problem approach

Answer :

1) In object-oriented programming, a singleton class is a class that can have only one object (an instance of the class) at a time.

2) After first time, if we try to instantiate the Singleton class, the new variable also points to the first instance created.

3) So whatever modifications we do to any variable inside the class through any instance, it affects the variable of the single instance created and is visible if we access that variable through any variable of that class type defined.

The key points while defining class as singleton class are :
1) Make constructor private.
2) Write a static method that has return type object of this singleton class. Here, the concept of Lazy initialization is used to write this static method.

7. SQL Question

Write a query that joins two tables A and B having common attribute ID and selects records(ID_NAME) that have matching ID values in both tables .

Problem approach

SELECT A.ID_Name, B.ID_Name
FROM A
INNER JOIN B ON A.ID=B.ID;

03
Round
Easy
HR Round
Duration30 Minutes
Interview date17 May 2021
Coding problem1

This was a typical HR round with some standard Behavioral questions like my interests, weaknesses, strengths, family background, are you willing to relocate or travel , why Amdocs, CEO of Amdocs etc.

1. Basic HR Question

Why do you want to work at amdocs?

Problem approach

Answer :

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 select an element by class name in CSS?

Choose another skill to practice
Similar interview experiences
company logo
Associate Software Engineer
3 rounds | 4 problems
Interviewed by Amdocs
1631 views
0 comments
0 upvotes
company logo
Associate Software Engineer
2 rounds | 2 problems
Interviewed by Amdocs
1025 views
0 comments
0 upvotes
company logo
Associate Software Engineer
3 rounds | 4 problems
Interviewed by Amdocs
877 views
1 comments
0 upvotes
company logo
Associate Software Engineer
4 rounds | 6 problems
Interviewed by Amdocs
1029 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Associate Software Engineer
3 rounds | 5 problems
Interviewed by Optum
1667 views
0 comments
0 upvotes
company logo
Associate Software Engineer
3 rounds | 5 problems
Interviewed by SAP Labs
1019 views
0 comments
0 upvotes
company logo
Associate Software Engineer
4 rounds | 4 problems
Interviewed by Mindtree
0 views
0 comments
0 upvotes