Amazon coding interview prep
Solid mid-difficulty algorithms, plus Leadership Principles in every round.
What the loop actually looks like
Amazon's coding questions skew practical and mid-difficulty — graphs on grids, heaps, intervals, and string processing. What's distinctive is that behavioural questions tied to the Leadership Principles are interleaved throughout, so roughly half your prep should go there.
What they reward
- Reliable execution on medium problems over heroics on hard ones
- BFS/DFS on grids and graphs
- Heaps for top-k and streaming problems
- Leadership Principles stories, in STAR format, with real metrics
Patterns to drill first
Problems worth your time
In priority order. Open one to read the approach, or generate an interactive lesson and watch it run.
Number of IslandsEach unvisited land cell launches a flood fill that sinks its whole island.
Medium
Top K Frequent ElementsCount, then select the k largest — a heap or bucket sort beats a full sort.Medium
Merge IntervalsSort by start, then merge any interval that overlaps the last one kept.Medium
Kth Largest Element in an ArrayA size-k min-heap keeps exactly the k largest seen so far.Medium
Course ScheduleYou can finish all courses iff the prerequisite graph has no cycle.Medium
Two SumStore what you've seen so each element only looks up its complement.Easy
Longest Substring Without Repeating CharactersGrow a window; when a repeat appears, shrink from the left past it.Medium
Meeting Rooms IIThe peak number of simultaneous meetings is the number of rooms needed.Medium
Tips specific to this loop
- — Budget real prep time for Leadership Principles — strong code with weak stories still fails the loop.
- — Grid BFS/DFS is the single highest-yield pattern here. Make it automatic.
- — Have concrete numbers in your behavioural stories; 'improved latency' is weaker than 'cut p99 by 40%'.
Drill these with interactive lessons
Generate a step-by-step lesson for any problem above — trace every variable and watch the pattern move until it clicks.
Start a free lessonPrepping for other companies
Our own editorial read on this loop, based on publicly reported experiences — not leaked or current question banks.