Following questions were asked in the second round of telephonic interview:
1. Asked about some questions related to Design patterns.
2. Find a loop in linked list
3. Length of the loop
Soln: Once the loop is detected, keep the slow pointer as it is, but move the fast pointer with a count variable until it reaches the slow pointer.
4. Variation of find a largest sum of contiguous array
5. Given two nodes in a graph, check if they are connected or not. Pre processing can be done but the result should be computed real quick
Soln: Create a hash map with key as a single node and value as a list of all connected nodes
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.