i
Amdocs
Filter interviews by
I was interviewed before Jan 2021.
Round duration - 90 Minutes
Round difficulty - Medium
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 .
Calculate the Nth term in the Fibonacci sequence, where the sequence is defined as follows: F(n) = F(n-1) + F(n-2)
, with initial conditions F(1) = F(2) = 1
.
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)).
Given a binary tree where each node contains an integer value, and a value 'K', your task is to find all the paths in the binary tree such that the sum of the node values in ...
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...
Round duration - 60 Minutes
Round difficulty - Medium
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 .
Reverse a given stack of integers using recursion. You must accomplish this without utilizing extra space beyond the internal stack space used by recursion. Additionally, you ...
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) Ins...
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 imp...
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 ...
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...
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 create...
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.MatchingColum...
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;
Round duration - 30 Minutes
Round difficulty - Easy
This was a typical HR round with some standard Behavioral questions like my interests, weaknesses, strengths, family background, why Amdocs, CEO of Amdocs etc.
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 y...
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.
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.
I have been actively involved in various extra curricular activities such as volunteering, sports, and leadership roles.
Volunteered at local animal shelter every weekend
Captain of the soccer team in high school
Organized charity events for underprivileged children
A friend function is a non-member function that has access to the private and protected members of a class.
Declared inside the class but defined outside the class scope
Can access private and protected members of the class
Not a member of the class but has access to its private members
Used to allow external functions to access and modify private data of a class
Can be declared as a friend in another class
atoi function converts a string to an integer in C.
The function takes a string as input and returns an integer.
Leading white spaces are ignored.
If the string contains non-numeric characters, the function stops conversion and returns the converted value.
The function returns 0 if the input string is not a valid integer.
Example: atoi('123') returns 123.
A program to print star pattern
Use nested loops to print the pattern
The outer loop controls the number of rows
The inner loop controls the number of stars to be printed in each row
Use print() or println() function to print the stars
Run time polymorphism is the ability of a program to determine the object type at runtime and call the appropriate method.
It is achieved through virtual functions and dynamic binding.
Allows for more flexible and extensible code.
Example: a base class Animal with virtual function makeSound() and derived classes Dog and Cat that override makeSound().
At runtime, if an Animal pointer points to a Dog object, calling makeSoun
Right outer join is a type of join operation that returns all the rows from the right table and the matching rows from the left table.
Right outer join is denoted by the RIGHT JOIN keyword in SQL.
It is used to combine rows from two tables based on a related column.
In the result set, unmatched rows from the right table will have NULL values for the columns of the left table.
A real-world scenario for using a right outer j...
Refrential integrity ensures that relationships between tables in a database remain consistent.
It is a database concept that ensures that foreign key values in one table match the primary key values in another table.
It prevents orphaned records in a database.
It maintains data consistency and accuracy.
For example, if a customer record is deleted, all related orders for that customer should also be deleted.
It is enforced...
Primary key uniquely identifies a record in a table, while Unique key ensures uniqueness of a column.
Primary key can't have null values, Unique key can have one null value
A table can have only one Primary key, but multiple Unique keys
Primary key is automatically indexed, Unique key is not necessarily indexed
Triggers are database objects that are automatically executed in response to certain events.
Triggers can be used to enforce business rules, audit changes, or replicate data.
There are two types of triggers: DML triggers and DDL triggers.
DML triggers are fired in response to DML statements (INSERT, UPDATE, DELETE).
DDL triggers are fired in response to DDL statements (CREATE, ALTER, DROP).
Swapping two character variables without using third
Use XOR operator to swap two variables without using third variable
Assign the XOR of both variables to the first variable
Assign the XOR of the first variable and second variable to the second variable
Top trending discussions
4 Interview rounds
based on 116 reviews
Rating in categories
Software Developer
7.7k
salaries
| ₹4.9 L/yr - ₹17 L/yr |
Software Engineer
1.9k
salaries
| ₹4 L/yr - ₹16 L/yr |
Softwaretest Engineer
1.7k
salaries
| ₹3 L/yr - ₹13.5 L/yr |
Functional Test Engineer
1.2k
salaries
| ₹3.6 L/yr - ₹12 L/yr |
Associate Software Engineer
1k
salaries
| ₹3.2 L/yr - ₹12 L/yr |
TCS
IBM
Infosys
Wipro