Level: Junior-Level
Round: Phone Screen · Type: Coding · Difficulty: 7/10 · Duration: 60 min · Interviewer: Neutral
Topics: Graph Theory, Topological Sort
Location: Seattle, WA, US
Interview date: 2026-01-20
Question: Determine which services will be affected when certain services are shut down, given dependencies between Amazon services. The problem is to be solved using topological sort.
The interviewer presented the problem verbally. The problem involves determining the impact of shutting down certain services within Amazon, given the dependencies between services.
First, I clarified the question by asking about the input format. The input is a hashmap where the key is the service name, and the value is a list of services that depend on it. I also asked if there could be invalid inputs like cycles, but was told the input is guaranteed to be valid.
My approach:
I explained my approach before coding, since the code cannot be run directly during the interview.