Problem of the day
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.
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.
I solved it by using stack and then performing an in order traversal of the BST.
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.