Google Screening Round L3

Anonymous User
1086
May 28, 2025

Given a graph, each node also has a value that defines it's priority in the connected component, you have to return top k high priority nodes.

eg (node, k) will return k high priority nodes in that connected component.

pros:

  1. I was able to understand the question and solve it before time.
  2. Provided time (nlogn) and space complexity O(N*E)
  3. Produced clean code with class and fun

cons:

  1. I did not handle the edge case where node is not present in the graph
  2. The interviewer asked me to dry run it and then I dry run the code

Can I expect to get a call for onsite interviews?

Comments (5)