Tip 1 : Build strong fundamentals in Data Structures and Algorithms. Practise basic data structures like Arrays, Linked List, Tree, Stack, Queues. For Graphs practise - BFS, DFS, Kruskal, Prims.
Tip 2 : Practice coding questions (medium-hard level) on online platforms like CodeZen, Codeforces, CodeChef.
Tip 3 : Practice mock interviews before the real interview.
Tip 1 : Briefly write you skills in which you are comfortable. Don't try to add anything vague as you will be questioned about everything which is written on resume.
Tip 2 : Have at least two projects on your resume which reflects application of your acquired skills
In this round i was tested for Data Structure competency. Two questions were asked.



The order in which the groups and members of the groups are printed does not matter.
inputStr = {"eat","tea","tan","ate","nat","bat"}
Here {“tea”, “ate”,” eat”} and {“nat”, “tan”} are grouped as anagrams. Since there is no such string in “inputStr” which can be an anagram of “bat”, thus, “bat” will be the only member in its group.
I first gave a brute force stored string solution . After explaining my solution I was asked to optimise it so I followed up with using a map and unique key to represent the strings(storing counts)
Given a peer to peer network, how will you design an algorithm to transfer data from one to node to the other receiver nodes? In its simplest form, a peer-to-peer (P2P) network is created when two or more PCs are connected and share resources without going through a separate server computer.
I discussed the problem with the interviewer and clarified my doubts regarding if there is weight assigned to network link between the nodes. I first proposed dijkstra algorithm but he told me that in large network it would be difficult to implement it. Then I gave BFS approach to him as in BFS we traverse level wise and then we can reach to closest receiver node.
Two questions were asked in this round on data structures and algorithms.



1. BSTIterator(Node root) - It is a parameterized constructor in which you are given the root of the Binary search tree. It will be called whenever an object of BSTIterator is created.
2. next() - This member function will return the next smallest element in the in-order traversal of the binary search tree. You need to implement this function.
3. hasNext() - This function will return true if there exists the next smallest element in the traversal else it will return false. You need to implement this function
I solved it by using stack and then performing an in order traversal of the BST.



If two words have the same frequency then the lexicographically smallest word should come first in your answer.
Can you solve it in O(N * logK) time and O(N) extra space?
I calculated the frequency of each word in the list and then stored it in a map. Then I sorted it with the help of priority queue.

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?