google logo
Google· SDE III

Google Phone Screening Round - L5

Posted
15 Apr 2025
374 reads

Summary

I experienced a phone screening round with Google for an L5 position and was presented with a sequence merging problem, which I solved using topological sort.

How it went

You have sequence array, each sequence has some value in order. You have to create a result where order of sequence stays as it is. Ex - [ [1,2,15,8], [2,4,7,8], [2,3,7,15] ] Output - 1,2,3,4,7,15,8 or 1,2,4,3,7,15,8 False case - [[1,6,4], [4,1]] -

Solved this using toposort. Created an adjList and indegree matrix and traversed the list to get the result array. For false case, checked if the cycle exists

Questions asked (1)

  1. 01

    Merge Sequences Maintaining Relative Order

    Data Structures & Algorithms · Hard

    You have sequence array, each sequence has some value in order. You have to create a result where order of sequence stays as it is. Ex - [ [1,2,15,8], [2,4,7,8], [2,3,7,15] ] Output - 1,2,3,4,7,15,8 or 1,2,4,3,7,15,8 False case - [[1,6,4], [4,1]] -

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Google recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!