Tip 1 : It is important to practice coding consistently because it is what enables you to solve interview-questions in the stipulated time. But before this, it is even important to have a clear understanding of all the data-structures, so that they can be easily implemented as and when required to solve a problem. It is also mandatory to have a clear understanding of the time and space complexities of algorithms because this is what you are judged upon in real interviews. Good intuition and a good approach to solve a problem is what really helps to crack the interview of such companies.
Tip 2 : They do not judge you upon the number of internships you have done or the number of projects you have made. A single ,good-quality project is sufficient, provided you have in-depth knowledge about it. What matters to them is how efficient learner you are, how good is your problem-solving skill and also how confident you are with your answers.
Tip 3 : Practise topic -wise questions, participate in lots of coding contests, watch lots of Youtube solutions even after you could solve a question, because you may find a different approach that is efficient than yours and watching video solutions is always a better option than just reading the solution , as it gives a clear and deeper understanding of the logics . Also pray hard along with your preparation.
Tip 1 : Keep your resume short and clear. Mention your projects and internships with a brief description and year of completion. Mention coding languages are known to you, or other technical skills that you are good at. Do not mention anything that you are not good at. Highlight the topics that you are really good at.
Tip 2 : Be very honest and figure out only those things in your resume that you really know. Anything extra or unknown may have a negative impact upon your interview if asked by the interviewer.
This round was held in the evening at 6 o'clock on Hackerrank. It had coding questions: easy, medium, and hard level and MCQ's ( 1 minute for each MCQ). Negative marking was also there.



There are three occurrences of the word 'NINJA' in the following grid:

1) Given word will not be a single character.
2) If occurrences of the given word start from two different cells, then these two occurrences are considered to be different.
Consider the word 'XYX' to be searched in the string 'AXYXB'. Here, we find an occurrence of 'XYX' at index 2 going in the right direction, and another occurrence at index 4 going in the left direction.
Although these two words correspond to the same word, they will be considered as different occurrences.
I sat with a pen and paper and used the provided test-case , which helped me to make a tree like structure , which had to be explored until its depth.This is where I realized that Depth First Search could be used to solve the problem.



The leaderboard scores are in descending order.
The game scores are given in ascending order.
This problem was of easy level and I could easily come up with a solution after identifying a relation between the rank and index of the element.
This was an interview round ( technical round) that was held on video-call and a coding platform was also shared. The interviewer was very friendly with me . She was praising me on every solution that I provided.




All the different rows are merged into a single row.
Step 1: I first traversed the linked list and on find a child pointer, descended down the list but forgot to keep track of the next pointers of such nodes.
Step 2: It dawned upon me that I need a container to keep hold of all next-pointers, and Stack could be used for this.
Step 3: Then I gave a solution using stack and also flattening the linked-list in O(n) time and the interviewer was happy with me.
There is a group of people and a special person in the group who does not know anybody, while other people in the group know him. Given a function: find(A, B) -> which returns True if A knows B and false if A does not know B. The task is to make minimum calls to this function to find out the special person.
Tip 1: Solution was easy: find(A, B)-> if it returns True, A is not the special person, since the special person does not know anybody. Also if find(A, B) -> return False, means B is not the special person, since he is known by everyone. This is how each time a person gets eliminated, and the person who remains is the special person.
This was an interview round ( technical round) that was held on video-call and a coding platform was also shared. The interviewer was very friendly with me . She was praising me on every solution that I provided.



1) Constructor: It initializes the data members as required.
2) add(value): It inserts an element into the HashSet. The function takes one argument which is the value that needs to be added and returns nothing
3) contains(value): It checks whether the element exists in the HashSet or not. The function takes one argument which is the value that needs to be searched for in the HashSet. The function returns true if the element exists, otherwise returns false.
4) remove(value): It removes an element from the HashSet. The function takes one argument which is the value that needs to be removed from the HashSet and returns the element which is being removed. If the element does not exist in the HashSet or if HashSet is empty, return -1.
Query-1 (Denoted by an integer 1)- Inserts an element in the HashSet
Query-2 (Denoted by an integer 2)- Returns a boolean value denoting whether the element is present in the HashSet or not.
Query-3 (Denoted by an integer 3)- Removes the element from the HashSet.
I knew that HashSet uses O(1) time to search an element in the list. Also, the word ' Hash' in HashSet helped me to come up with the solution, to use hash table that can help solve the problem efficiently.
It was online HR+Technical Round .



1. A binary tree is a tree in which each node has at most two children.
2. The given tree will be non-empty.
3. The given tree can have multiple nodes with the same value.
4. If there are no nodes in the tree which are at distance = K from the given node, return an empty list.
5. You can return the list of values of valid nodes in any order. For example if the valid nodes have values 1,2,3, then you can return {1,2,3} or {3,1,2} etc.

Consider this tree above. The target node is 5 and K = 3. The nodes at distance 1 from node 5 are {2}, nodes at distance 2 from node 5 are {1, 4} and nodes at distance 3 from node 5 are {6, 3}.
Tip 1:We can solve this problem using breadth first search. Main thing to observe in this problem is that if we find two marked nodes which are at largest distance from each other considering all pairs of marked nodes then if a node is at a distance less than K from both of these two nodes then it will be at a distance less than K from all the marked nodes because these two nodes represents the extreme limit of all marked nodes, if a node lies in this limit then it will be at a distance less than K from all marked nodes otherwise not.
As in above example, node-1 and node-4 are most distant marked node so nodes which are at distance less than 3 from these two nodes will also be at distance less than 3 from node 2 also. Now first distant marked node we can get by doing a bfs from any random node, second distant marked node we can get by doing another bfs from marked node we just found from the first bfs and in this bfs we can also found distance of all nodes from first distant marked node and to find distance of all nodes from second distant marked node we will do one more bfs, so after doing these three bfs we can get distance of all nodes from two extreme marked nodes which can be compared with K to know which nodes fall in K-distance range from all marked nodes.
Tip 1: I had studied Python in-depth , so could answer all his questions .
Tip 2: There were some questions where I was stuck, but then was assisted by the interviewer in approaching to the solution.
He gave me a situation where my colleague leaves the project in-between, and the deadline is approaching, how would I make up to meet the deadline in such a situation.
Tip 1: Taking assistance from my seniors, more dedication towards the project and approaching the manager for help were my answers .

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