Skip to content
Related Articles
Get the best out of our app
Open App

Related Articles Interview Experience

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Round 1: Algo round

  • Given a sorted array, find two values a and b which sum up to x. I told use binary search, he said optimize it. I couldn’t do it, he gave hint array is sorted so consider that. I thought of restricting the search by pre-calculating lower_bound of x.
  • Find nth element from last of singly-linked list. Use two pointers.
  • Given a string. Find all permutations of string, sort them and give index of particular string in the sorted list. I couldn’t get how to find all permutations (See this), but I explained the other parts of the question. For index, I told him we can use some math like formula for finding no. of permutations starting with a particular letter.
  • Given a matrix of size n x n. Cells (i, j) and (j, i) are 1 if person i shakes hand with person j. Find all groups of people i.e. if person i shakes hand with person j and person j shakes hand with person k, then {i, j, k} is one group. I tried to explain union-find algorithm to him, but I wasn’t able to explain him clearly. So, he told me to use DFS like approach, I tried to tell him the complete algorithm but then time limit reached and he said time’s up.

Round 2: F2F (Tech) round

  • Questions about my resume – work and projects.
  • He gave a SQL query to do based on my project. In my project I had used XML, so he asked me to design schema if SQL has to be used instead. Then based on that schema he asked me a query which I couldn’t solve.
  • Find top 10 max elements given a structure of string and float values. Use priority queue.
  • How will be resolved? DNS resolution steps. Then, he asked, how many GET requests will be sent? I was not sure and said 1 request should do. He then asked how will server know what to send based on just 1 request, I didn’t knew how.
  • Difference between process and thread. Can a process be invoked from a thread? I wasn’t sure of this.
My Personal Notes arrow_drop_up
Last Updated : 05 Aug, 2019
Like Article
Save Article
Similar Reads