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

Associate Software Engineer

Amdocs
upvote
share-icon
3 rounds | 8 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 Test
Duration90 Minutes
Interview date4 Aug 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. Maximum Sum Subsequenc

Hard
45m average time
55% success
0/120
Asked in companies
ArcesiumExpedia GroupOla

You are given an array “NUMS” consisting of N integers and an integer, K. Your task is to determine the maximum sum of an increasing subsequence of length K.

Note:
1. The array may contain duplicate elements.
2. The array can also contain negative integers.
3. Every element of the subsequence must be greater than or equal to the previous element.

The subsequence of an array is a sequence of numbers that can be formed by deleting some or no elements without changing the order of the remaining elements. For example, if the given array “NUMS” = {1, 2, 5, 4, 8}, then {1, 2, 5, 4, 8}, {1, 5, 8}, {2} are some of the valid subsequences whereas the sequence {4, 2} is not a valid subsequence as the order of the elements differ from the original array.

Problem approach

This was a preety good DP-problem . I struggled a bit initially on finding the DP transition but on carefully observing the constraints of the problem , I figured that a O(N^2*K) DP solution will also pass the Test Cases .

Steps :
1) Initiliase a DP array dp[n][k+1] . Store -INF in all cells initally.
2) Let dp[i][j] store the answer for an array of length i and a subsequence of length j
3) Now, for every i , dp[i][1]=arr[i]
4) For each i , find dp[i][j] for every j from 2 to k
5) For every i>=1 , traverse from i-1 to 0 and check if arr[i] > arr[t] where t = [0,i-1] , if we have arr[i]>arr[t] then dp[i][j] = max(dp[i][j] , arr[i]+dp[t][j-1])
6) Final answer = max(dp[i][k]) where i=[0,n-1]

Try solving now

2. First Unique Character in a String

Easy
15m average time
85% success
0/40
Asked in companies
MicrosoftIBMLivekeeping (An IndiaMART Company)

Given a string ‘STR’ consisting of lower case English letters, the task is to find the first non-repeating character in the string and return it. If it doesn’t exist, return ‘#’.

For example:

For the input string 'abcab', the first non-repeating character is ‘c’. As depicted the character ‘a’ repeats at index 3 and character ‘b’ repeats at index 4. Hence we return the character ‘c’ present at index 2.
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
02
Round
Medium
Video Call
Duration60 Minutes
Interview date5 Aug 2021
Coding problem5

This round consisted of questions from DS/Algo , OOPS and Operating Systems primarily usage of some basic UNIX commands .

1. Implement Atoi Function

Hard
10m average time
90% success
0/120
Asked in companies
AmazonAdobeMorgan Stanley

You are given a string ‘s’ of length 'n'.


Implement the atoi(string s) function, which converts a given string into a 32-bit signed integer, following similar principles as the atoi function in C/C++.


Here's the step-by-step algorithm for myAtoi(string s):


1. Discard any leading whitespaces.


2. If the next character (if not at the end of the string) is '-' or '+', consider it to determine the sign of the result. If neither is present, assume the result is positive.


3. Read and accumulate digits until a non-digit character is encountered or the end of the input is reached.


4. Convert the collected digits into an integer (e.g., "123" becomes 123, "0032" becomes 32). If no digits were read, the integer is 0. Adjust the sign as needed (as determined in step 2).


5. If the integer falls outside the range of a 32-bit signed integer [-2^31, 2^31 - 1], constrain it to stay within the range. For instance, if the integer is less than -2^31, set it to -2^31; if it's greater than 2^31 - 1, set it to 2^31 - 1.


6. Return the resulting integer.


Note :
1. Only the space character ' ' is treated as a whitespace.

2. All characters other than leading whitespace or digits are considered.


Example:
Input: 45rohit12

Output: 45

Explanation: 
Leading Whitespace: Leading whitespace characters (" ") are ignored.

Numeric Portion: The numeric portion starts with the digit "4".

Reading Numeric Characters: The algorithm reads "4" and "5" to form "45".

End of Numeric Portion: The numeric portion ends at "r", non-numeric characters are skipped.

Parsing Result: "45" is parsed into the integer value 45, the final result.
Problem approach

This was a pure implementation based problem where I was tested on how well can I figure out all the edge cases and code the problem in a production ready manner.

Steps :
1) First of all check if the string is empty , if it is then simply return 0
2) Remove all the spaces from the string
3) Handle the signs '+' and '-' .
4) Handle cases of overflow(if ans>INT_MAX/10 or ans'7' or ans==INT_MIN/10 and s[i]>'8')
5) If sign is a '-' , perform ans=ans*10-(s[i]-'0');
6) Else if sign is a '+', perform ans=ans*10+(s[i]-'0');
7) Finally, return the ans

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

Try solving now

2. OOPS Question

Explain Run Time Polymorphism in C++.

Problem approach

Answer : 
1) Runtime polymorphism is also known as dynamic polymorphism or late binding. In runtime polymorphism, the function call is resolved at run time.

2) In contrast, to compile time or static polymorphism, the compiler deduces the object at run time and then decides which function call to bind to the object. 

3)In C++, runtime polymorphism is implemented using method overriding.

4) Function overriding is the mechanism using which a function defined in the base class is once again defined in the derived class. In this case, we say the function is overridden in the derived class.

5) We should remember that function overriding cannot be done within a class. The function is overridden in the derived class only. Hence inheritance should be present for function overriding.

6) The second thing is that the function from a base class that we are overriding should have the same signature or prototype i.e. it should have the same name, same return type and same argument list.

Let us see an example that demonstrates method overriding.

#include 
using namespace std;
class Base
{
public:
void show_val()
{
cout << "Class::Base"< }
};
class Derived:public Base
{
public:
void show_val() //function overridden from base
{
cout << "Class::Derived"< }
};
int main()
{
Base b;
Derived d;
b.show_val();
d.show_val();
}

Output:

Class::Base
Class::Derived

3. OOPS Question

What is a friend function in C++?

Problem approach

Answer : 

1) A friend function is a function that is specified outside a class but has the ability to access the class members’ protected and private data. 
2) A friend can be a member’s function, function template, or function, or a class or class template, in which case the entire class and all of its members are friends.


Uses of Friend Functions :

1) In special cases when a class’s private data needs to be accessed directly without using objects of that class, we need friend functions. For instance, let’s consider two classes: Director and Doctor. We may want the function gross_salary to operate the objects of both these classes. The function does not need to be a member of either of the classes.

2) They are also used in operator overloading because they are more intuitive. The binary arithmetic operator that is commonly used can be overloaded the friend function way. 


Important Characteristics of Friend Functions :

1) A friend function does not fall within the scope of the class for which it was declared as a friend. Hence, functionality is not limited to one class.

2) The friend function can be a member of another class or a function that is outside the scope of the class.

3) A friend function can be declared in the private or public part of a class without changing its meaning.

4) Friend functions are not called using objects of the class because they are not within the class’s scope.

5) Without the help of any object, the friend function can be invoked like a normal member function.

6) Friend functions can use objects of the class as arguments.

7) A friend function cannot explicitly access member names directly. Every member name has to use the object’s name and dot operator.

4. OS Question

Explain any 5 essential UNIX commands .

Problem approach

Answer : 
1) ls -> Lists files in current directory
2) cd -> Change directory to tempdir
3) mkdir -> Make a directory called graphics
4) rmdir -> Remove directory (must be empty)
5) cp -> Copy file into directory

5. OS Question

What do chmod, chown, chgrp commands do?

Problem approach

These are file management commands. These are used for:

chmod - It changes the permission set of a file
chown - It changes the ownership of the file.
chgrp - It changes the group of the file.

Example : 
$ chmod g+w test
It changes permission for a user group to write.

$ chown adas1923 testfile
It changes the owner of testfile to adas1923.

$ chgrp moderators testfile
It changes a group of testfile to moderators.

03
Round
Easy
HR Round
Duration30 Minutes
Interview date5 Aug 2021
Coding problem1

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.

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