Google Screening Round L3
Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2025-05-28Added By Anonymous
Source: Link
Company: Google
Role: l3
Interview Stage: Phone Screen
Location: unknown
Year: unknown
Original Post Content:
Given a graph, each node also has a value that defines its priority in the connected component. You have to return top k high priority nodes.
e.g., (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 func.
Cons:
1.I did not handle the edge case where a node is not present in the graph.
2.The interviewer asked me to dry run it and then I dry ran the code.
Can I expect to get a call for onsite interviews?