Amazon Coding Interview Questions
23 Amazon coding interview problems with full optimal solutions — 2 easy, 18 medium, 3 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Amazon interviewer values, and a FAQ section.
Showing 3 problems of 23
- #42hardfrequently asked
42. Trapping Rain Water
Given heights, compute water trapped after rain. Amazon asks this to test whether you reach for the two-pointer invariant 'water at i = min(maxLeft, maxRight) - height[i]' and can articulate why two-pointer beats prefix-max arrays on space.
- #127hardfrequently asked
127. Word Ladder
Find the length of the shortest transformation from beginWord to endWord, changing one letter at a time. Amazon asks this to test whether you reach for BFS on an implicit graph and articulate the shortest-path-on-unweighted-edges insight.
- #1192hardfrequently asked
1192. Critical Connections in a Network
Find all critical connections — the bridges of an undirected graph, edges whose removal splits the network. Amazon candidates report this hard as a Tarjan's litmus test: at 10^5 nodes and edges the brute-force remove-and-recheck approach is hopeless, so the interview comes down to whether you can articulate the discovery-time / low-link invariant out loud rather than recite memorized code.
Related interview-prep guides
HireVue Tech Interview Guide: The 2026 Playbook for Async Video Rounds
HireVue is the category-leading async video interview platform. Candidates record answers solo, on the clock, and a combined AI-plus-human review layer scores the recording days later. For 2026 tech jobseekers, the format is different enough from live interviews to need its own playbook. This guide is that playbook.
HackerRank Tech Interview Guide 2026: What It Tests, How It Tracks You, and the Modern Setup
HackerRank is a browser-sandboxed coding-assessment platform that tests algorithms, SQL, and role-specific skills, and logs every keystroke, paste, and tab-focus change inside its own tab. As of the 2026 hiring cycle it is still the volume leader in first-round technical screens. Its detection ends at the browser boundary: it sees nothing running elsewhere on your machine.
CodeSignal GCA for Tech Interviews in 2026: The Complete Guide
The CodeSignal General Coding Assessment is a 70-minute, four-task timed test scored on a 600 to 850 scale, used as a filter by Goldman Sachs, Capital One, Robinhood, Brex, and a growing list of tech and finance employers. This guide breaks down what it tests, how it scores, what it tracks during your session, and how a modern desktop setup pairs with it without showing up in proctored recordings.