Skip to content
Tech Interview Prep

Real Interview Questions for the Software Development Engineer (SDE) at Amazon

New

Practice MCQs

Answers count toward the Software Development Engineer (SDE) and overall leaderboards; your latest answer to each question is the one that counts.

13 questions · Flow follows Relevance until this set has a learning order.

MCQ-1A singly linked list holds 1 -> 2 -> 3 -> 4 and is passed to this Python 3.12 reversal: `def reverse(head):` / `prev = None` / `cur = head` / `while cur:` / `cur.next = prev` / `cur = cur.next` / `prev = cur` / `return prev`. What does `reverse(head)` return, and what state is the list left in?
Difficulty: Hard
MCQ-2During a pricing API launch review, a senior peer wants a Redis cache in front of the price lookup and you want a composite index on the lookup table. Staging p99 is 410 ms against a 250 ms target. The manager has approved only one change this sprint, and the peer's cache has already been benchmarked at 90 ms p99 while the index has not been tested. What should you do?
Difficulty: Hard
MCQ-3You and a senior teammate disagree on where retry logic belongs, in the client or in the gateway. Your benchmark shows the gateway adds 40 ms to p99, and they have blocked your PR with two unanswered comments. Release is Thursday and they are out until Wednesday evening. What should you do today?
Difficulty: Hard
MCQ-4In a Leadership Principle round, a candidate's draft says the payments team cut duplicate charges from 40 a week to 2 after moving to a new queue. The candidate wrote the idempotency-key change in the retry path and reviewed the principal's migration design. The interviewer asks for a specific action and result from the candidate's own work. Which version should the candidate give?
Difficulty: Medium
MCQ-5A Python 3.12 function counts downward paths in a binary tree whose values sum to a target, using prefix sums in a hash map. Its walk down the tree is the chain root 4, left child -1, left child 3, then left child 2, and the target is 6. The map is seeded with {0: 1} before the walk. What does the function return?
Difficulty: Medium
MCQ-6A tracking service keeps one current status per package and consumes scanner events from a queue that does not preserve order. Package 88214 is stored at sequence 4, DEPARTED_FC. The queue then delivers sequence 6, OUT_FOR_DELIVERY, then sequence 5, ARRIVED_HUB, then sequence 6 again as a duplicate, and it never redelivers anything else. Which rule leaves the status at OUT_FOR_DELIVERY and notifies the customer once?
Difficulty: Medium
MCQ-7A Python 3.12 solution to the longest substring without repeating characters keeps a set for the current window. On a repeated character it clears the whole set, then adds the new character. Run on `s = 'abcbda'`, what length does this code return?
Difficulty: Medium
MCQ-8An SDE candidate builds a binary tree from preorder `[4,2,1,3,6,5]` and inorder `[1,2,3,4,6,5]`, with all values distinct. The root is 4, and inorder splits the rest into left `[1,2,3]` and right `[6,5]`. Which tree does the right subtree of 4 produce?
Difficulty: Medium
MCQ-9A BST of order IDs has root 500, with left child 300. Node 300's right child is 400, and 400 has children 350 and 450. A lookup finds the lowest common ancestor of P=350 and Q=450 by walking down from the root and comparing keys, never traversing the whole tree. How many nodes does the walk visit, and what does it return?
Difficulty: Medium
MCQ-10You committed to an export feature for a Friday launch and shipped nine days late. The cause was a 40 million row backfill you never timed: it ran at about 80 rows per second on a dedicated, idle replica and took six days. Requirements stayed fixed and reviews cleared within a day. What root cause and corrective action should your answer name?
Difficulty: Medium
MCQ-11A tree of houses has root 3, left child 4 and right child 5. Node 4 has children 1 and 3, and node 5 has a right child 1. A robber cannot rob a house and its direct parent or child. What is the largest amount the robber can take, and which choice achieves it?
Difficulty: Medium
MCQ-12A locker bank runs one thread per kiosk, and every kiosk shares one in-memory `Compartment` per door. Two customers tap compartment 7 within 5 ms, and both `reserve` calls read status AVAILABLE before either writes RESERVED, so the door is assigned twice. The bank has 12 doors and needs at least 200 reservations per second, and the kiosks cannot share a lock across doors. Which change prevents the double assignment?
Difficulty: Medium
MCQ-13A warehouse must ship packages weighing 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10 kg in the given order. Each day's load cannot exceed the ship's capacity, and packages cannot be split across days. What is the smallest capacity that ships every package within 5 days?
Difficulty: Medium

Curated: · Written: · Reviewed: