Tip 1 : Code as many as questions as you can if you have time, even if you think you know the answer.
Tip 2 : Know the projects which you mention.
Tip 1 : Have 1-2 programming projects on resume.
Tip 2 : Know about the projects in detail (not necessarily in deep).
Online Exam
It was an online round of 100 minutes on Amcat.
It was divided into 3 sections with fixed time and the time left of one section didn't roll over to another -
Debugging and Code completion(20 mins)-6 debugging and 1 code completion questions. Time management was very important in this section. These were very basic.
Example question - Given a Point class, and a member function which calculates distance between 2 points. Complete the function check(Point P1, Point P2, Point P3) which should return True if the triangle is right angled.
Aptitude(20 mins)-10 aptitude questions were asked which were easy to moderate difficulty. This section didn't require any extra preparation and the time allotted was quite sufficient. No negative marking.


For example, consider the scenario shown below. The coordinates of Euclid, Pascal, and Monte have been shown in the figure.
Euclid and Monte are standing at the endpoints of a diagonal and Pascal is standing at one vertex of the other diagonal. Using the coordinates of Pascal, Euclid and Monte, figure out the coordinates of Pythagoras, which will be (10, 15).
The coordinates of Pythagoras will be unique for the unique values of the other three coordinates.
sum of opposite coordinate is same. So in a parallelogram ABCD, A+C = B+D (A, B, C, D denote the position vectors)


In the graph given below:
2 ---- 4 ---- 6
| |
| |
| |
3 ---- 5
Here, the minimum vertex cover involves vertices 3 and 4. All the edges of the graphs are incident on either 3 or 4 vertex of the graph.
1. Nodes are numbered from 1 to 'N'.
2. Your solution will run on multiple test cases. If you are using global variables make sure to clear them.



Did not get full marks in it.
Used DP[idx][weight1][weight2] where this denotes that we are on bag number idx and we can have weight1 more weight in knapsack 1 and weight2 more weight in knapsack 2. Now the transition is just like normal knapsack.
Basic operating systems questions like what is concurrency.
Travelling salesman problem.
Convert a number to string - example 102 to one hundred two (didn't need the complete code).
Some other easy array questions.






Explained the approach like above, it is a implementation based problem. Interviewer didn't ask for whole code.
4 coding questions.
Asked for the written code only for the third one.
Also asked me about my weaknesses and strengths.


1. Push(num): Push the given number in the stack.
2. Pop: Remove and return the top element from the stack if present, else return -1.
3. Top: return the top element of the stack if present, else return -1.
4. getMin: Returns minimum element of the stack if present, else return -1.
For the following input:
1
5
1 1
1 2
4
2
3
For the first two operations, we will just insert 1 and then 2 into the stack which was empty earlier. So now the stack is => [2,1]
In the third operation, we need to return the minimum element of the stack, i.e., 1. So now the stack is => [2,1]
For the fourth operation, we need to pop the topmost element of the stack, i.e., 2. Now the stack is => [1]
In the fifth operation, we return the top element of the stack, i.e. 1 as it has one element. Now the stack is => [1]
So, the final output will be:
1 2 1
Told him I knew the question already so he switched to the next question.



1. The helper function ‘knows’ is already implemented for you.
2. ‘knows(A, B)’ returns "false", if A doesn't know B.
3. You should not implement helper function ‘knows’, or speculate about its implementation.
4. You should minimize the number of calls to function ‘knows(A, B)’.
5. There are at least 2 people at the party.
6. At most one celebrity will exist.
I told the solution same as in the above URL.



1. A complete binary tree is a binary tree in which nodes at all levels except the last level have two children and nodes at the last level have 0 children.
2. Node ‘U’ is said to be the next node of ‘V’ if and only if ‘U’ is just next to ‘V’ in tree representation.
3. Particularly root node and rightmost nodes have ‘next’ node equal to ‘Null’
4. Each node of the binary tree has three-pointers, ‘left’, ‘right’, and ‘next’. Here ‘left’ and ‘right’ are the children of node and ‘next’ is one extra pointer that we need to update.


I had done this question on interview bit already so used the same approach.


If the given matrix is:
[ [1, 2, 5],
[3, 4, 9],
[6, 7, 10]]
We have to find the position of 4. We will return {1,1} since A[1][1] = 4.
I also had done this question on interview bit already so used the same approach.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?