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

SDE - 1

Amdocs
upvote
share-icon
4 rounds | 12 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 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 Test
Duration90 minutes
Interview date9 Jan 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. First Unique Character in a String

Moderate
15m average time
85% success
0/80
Asked in companies
OlaWalmartPiramal finance

You are given a string S of length N. Your task is to find the index(considering 1-based indexing) of the first unique character present in the string. If there are no unique characters return -1.

Note

A unique character in a string is the character that appears only once in the string. For example, ‘h’, ‘e’, and ‘o’ are the unique characters in the string “hello”.
Problem approach

Approach : 
1) Make a count array and initialize all characters by -1, i.e., all considered as absent.
2) Traverse the given string, and the value of count[x] will be the index of ‘x’ if ‘x’ appears only once. Else, the value is going to be either -1 or -2.
3) Now, traverse the count array and check if the ith character occurs only once (count[i] has a positive value) and appears before the current result, then update the result.
4) Add the character present at the result index in the arraylist.

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
Video Call
Duration50 Minutes
Interview date11 Jan 2021
Coding problem4

This round consisted of 1 question from DSA with medium level of difficulty and then the rest of the questions were asked from DBMS and OOPS.

1. Ways To Make Coin Change

Moderate
20m average time
80% success
0/80
Asked in companies
MicrosoftHSBCOracle

You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}. You need to figure out the total number of ways W, in which you can make a change for value V using coins of denominations from D. Print 0, if a change isn't possible.

Problem approach

This was a very standard DP problem and I had already solved it on platforms like LeetCode and CodeStudio so I was able to come up with the logic and code it preety fast.

Steps :
1) Create a two-dimensional array, ‘dp’, where ‘dp[i][j]’ will denote the total number of ways to make j value by using i coins.
2) Run 2 loops ,1st one from 1 to value and second one throught the array denominations.
3) Fill dp array by the recurrence relation as follows:
ways[i][j] = ways[i-1][j] + ways[i][j-denominations[i]] (if j-denominations[i]>=0)
Where first term represents that we have excluded that coin and,
Second term represents that we have included that coin.
4) Base Case : Fill dp[0]=0 (as we can make 0 amount by giving no coins at all) and the remaining indices with INT_MAX value
5) Finally , if dp[value]==INT_MAX , return -1 as it is not possible to make "value" using the given coins else return dp[value] itself


TC : O(N*V) where N=number of coins and V=Value to be made
SC : O(N*V)

Try solving now

2. DBMS Question

What is views in SQL?

Problem approach

Answer :
1) Views in SQL are kind of virtual tables.
2) A view also has rows and columns as they are in a real table in the database. 
3) We can create a view by selecting fields from one or more tables present in the database. 
4) A View can either have all the rows of a table or specific rows based on certain condition.

3. DBMS Question

How to Take a Backup of a Table in MySQL?

Problem approach

Answer :

Method 1 – Taking a Backup of a MySQL Table Using INSERT INTO

CREATE TABLE table_backup; 
INSERT INTO table_backup SELECT * FROM table;

This method creates the structure of the table including indexes and then loading the data in via one statement.


Method 2 – Taking a Backup of a MySQL Table Using mysqldump

mysqldump -u{backup_user} -p{backup_password} from_db_name table_to_backup > backup_file.sql

The backup is taken using mysqldump and can be directed to a location of choice. Disk space is therefore not a consideration for the data drive, rather it is necessary just for the location being backed up to.

4. OOPS Question

Difference between Constructor and Method?

Problem approach

Answer : 

Constructors :
1) A Constructor is a block of code that initializes a newly created object.
2) A Constructor can be used to initialize an object.
3) A Constructor is invoked implicitly by the system
4) A Constructor is invoked when a object is created using the keyword new.
5) A Constructor doesn’t have a return type.
6) A Constructor’s name must be same as the name of the class.
7) A Constructor cannot be inherited by subclasses.

Method :
1) A Method is a collection of statements which returns a value upon its execution.
2) A Method consists of Java/C++ code to be executed.
3) A Method is invoked by the programmer.
4) A Method is invoked through method calls.
5) A Method must have a return type.
6) A Method’s name can be anything.
7) A Method can be inherited by subclasses.

03
Round
Medium
Video Call
Duration50 Minutes
Interview date11 Jan 2021
Coding problem4

This was a mixed round where I was asked to code to Programming questions and later I was asked some important concepts from OOPS and Java . I was also asked the famous Die-Hard Puzzle in this round .

1. Intersection of Linked List

Easy
25m average time
73% success
0/40
Asked in companies
OracleThought WorksIBM

You are given two Singly Linked Lists of integers, which may have an intersection point.

Your task is to return the first intersection node. If there is no intersection, return NULL.


Example:-
The Linked Lists, where a1, a2, c1, c2, c3 is the first linked list and b1, b2, b3, c1, c2, c3 is the second linked list, merging at node c1.

alt.txt

Problem approach

Approach : 

I) Using Hashing :

Basically, we need to find a common node of two linked lists. So we hash all nodes of the first list and then check the
second list.

Note : Hash the nodes not the node value

1) Create an empty hash set.
2) Traverse the first linked list and insert all nodes' addresses in the hash set.
3) Traverse the second list. For every node check if it is present in the hash set. If we find a node in the hash set,
return the node

TC : O(m+n)
SC : O(min(m,n))

II) Using Two pointers :

1) Initialize two pointers ptr1 and ptr2 at the head1 and head2.
2) Traverse through the lists,one node at a time.
3) When ptr1 reaches the end of a list, then redirect it to the head2.
4) Similarly when ptr2 reaches the end of a list, redirect it the head1.
5) Once both of them go through reassigning, they will be equidistant from the collision point
6) If at any node ptr1 meets ptr2, then it is the intersection node.
7) After second iteration if there is no intersection node it returns NULL.

TC : O(m+n) where m=Length of LL-1 and n=Length of LL-2
SC : O(1)

Try solving now

2. Check If The String Is A Palindrome

Easy
10m average time
90% success
0/40
Asked in companies
IntuitSprinklrCIS - Cyber Infrastructure

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

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. 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. I
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.

04
Round
Easy
HR Round
Duration30 Minutes
Interview date11 Jan 2021
Coding problem2

This is a cultural fitment testing round .HR was very frank and asked standard questions. Then we discussed about my role.

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.

2. Basic HR Question

Why should we hire you ?

Problem approach

Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round, like what are the projects currently the company is investing, which team you are mentoring. How all is the work environment etc.
Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical questions. No coding in most of the cases but some discussions over the design can surely happen.

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