Amazon · SDE II, L5 (5 years)
Rounds
- Phone Screen
Questions asked
- Topological sort question. Given a list of packages in a warehouse and the dependencies, see if all packages can be shipped.
packages = [a, b, c, d]
dependencies = [[a, b], [a, c], [b, d]]
Tips
- Know Kahn’s algorithm (BFS with in-degrees) and DFS cycle detection, either works. Monorepo Build Plan on FrontendLead is a similar idea.
