Amazon's DSA rounds draw heavily from graphs, dynamic programming, heaps, and binary-search-on-answer patterns — and interviewers care as much about clean, modular code and complexity discussion as about getting the right answer. The three problems below are real, recently reported (2025–2026) Amazon questions with full solutions.
Rooms are numbered 0 to n-1 and each locked room contains keys to other rooms. Starting in room 0 (which is unlocked), determine whether every room can eventually be visited.
Input: rooms = [[1], [2], [3], []]
Output: true
Room 0 has a key to room 1, room 1 to room 2, room 2 to room 3 — every room is reachable.
Given an array of integers and a target integer K, count the number of contiguous subarrays whose elements sum exactly to K.
Input: nums = [1, 1, 1], k = 2
Output: 2
Given a 2D grid of 1s (land) and 0s (water), count the number of islands, where land cells connect not only horizontally/vertically but also diagonally.
Input: grid = [[1,1,0],[0,1,0],[0,0,1]]
Output: 2
The diagonal 1 at bottom-right does not touch the top-left cluster in any of the 8 directions, so it forms its own island.
More DSA questions Amazon has asked recently
These topics were reported in verified 2025–2026 Amazon loops. Full problem statements, solutions and explanations for these are part of the Placement-Ready PYQ Kit.
9 more verified DSA questions with full solutions in the full Placement-Ready PYQ Kit
Includes every round they were asked in, from Phone Screen through Bar Raiser.

