Tip 1 : Have a good understanding of computer science fundamentals.
Tip 2 : Have in-depth knowledge of the technologies used in the projects.
Tip 3 : Practice as many questions as you can and give mock interviews to build confidence.
Tip 1 : Have some variety in the projects, don't have all projects using the same technology.
Tip 2 : Make sure it is up to date at the time of applying.
Normal Coding round on Harckerrank in the night




The area of the largest square submatrix with all 1s is 4.
Standard problem, went ahead with the dp approach and solved.


Consider the sequence of customers as [ 1, 2, 3, 2, 3, 1 ] for N = 3 and K = 2.
The procedure takes place as follows :
1) At the start, Customer 1 comes and finds an available computer and starts using it and now the number of available computers is reduced by 1.
2) Customer 2 comes and he is also able to find an available computer and he starts using the computer. Now all the computers are unavailable.
3) Customer 3 comes and goes back immediately as there are no computers available currently.
4) Customer 2 leaves the cafe making 1 computer available.
5) As customer 3 has already left no new computers are made available.
6) Customer 1 leaves the cafe and all the computers are again available.
As only Customer 3 was unable to find any available computers therefore the answer is 1 for this case.
Sorted the order list and used the priority queue to take order one by one and calculate the answer.



1. Horizontally as 1x2 tile
2. Vertically as 2x1 tile
The number of ways might be large so output your answer modulo 10^9 + 7.

Tried solving it using deque was only able to pass half of the test cases.
The round was scheduled at 12 noon.




1. It is guaranteed that the given graph is DAG.
2. There will be no multiple edges and self-loops in the given DAG.
3. There can be multiple correct solutions, you can find any one of them.
4. Don’t print anything, just return an array representing the topological sort of the vertices of the given DAG.
Used the BFS approach to implement it, the interviewer was satisfied.

One dish can be prepared by only one cook, however, two or more cooks can simultaneously prepare different dishes.
Let ‘N’ = 4, ‘ranks’ = [1, 2, 3, 4] and ‘M’ = 11. Then the minimum time required to cook 11 dishes will be 12 minutes. The cooks should prepare dishes in the following manner -:
Cook-0 prepare 4 dishes in 10 minutes i.e (1 dish in 1 minute, 1 more dish in next 2 minutes, 1 more dish in next 3 minutes, 1 more dish in next 4 minutes).
Cook-1 prepare 3 dishes in 12 minutes i.e (1 dish in 2 minutes, 1 more dish in 4 minutes, 1 more dish in 6 minutes).
Cook-2 prepare 2 dishes in 9 minutes i.e (1 dish in 3 minutes, 1 more dish in the next 6 minutes).
Cook-3 prepare 2 dishes in 12 minutes i.e (1 dish in 4 minutes, 1 more dish in the next 8 minutes).
If all four cooks work simultaneously then they can prepare(4 + 3 + 2 + 2 = 11) dishes in 12 minutes. And it is the minimum possible time.
I went ahead with the BFS approach, and the interviewer was satisfied.
It was more an Object oriented Design round.
Design a coffee vending machine. Come up with all the classes and methods needed for it.
Tip 1 : Figure out all the requirements in the start and the scope of the design as it is a very open-ended problem.
Tip 2 : Try to write neat code, use descriptive names for variables.
Tip 3 : May ask you to run the code so if you are not implementing complete methods try to just declare then and return null to make the code work. Also the code might get very huge so try to run it time to time to catch errors.
What is virtual memory?
What is threading?
What is context switching?
Tip 1 : Have good understanding of OS.
What is virtual dom and how it works in react?
Tip 1 : I had React in my resume thus this question appeared. Have good understanding of all technologies mentioned in the resume.
Behavioural question about leadership and team-bonding.
Tip 1 : Show positive attitude, willingness to work in team etc.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?