Matrix interview questions
146 matrix problems tagged across recent interview reports. Drilled most heavily by doordash, uber, and amazon.
Matrix problems make up 146 interview questions across coding platforms, and they're unavoidable at DoorDash, Uber, and Amazon. You'll navigate 2D grids, traverse paths, update cells based on neighbors, and optimize for both time and space. The pattern spans from BFS distance calculations (01-matrix) to dynamic programming on grids (cherry-pickup). Most candidates drill them unevenly, strong on traversal, weak on state transitions. StealthCoder is your safety net when a matrix variant you haven't seen lands in your live OA.
Most-asked matrix problems
Showing top 50 of 146 matrix problems by # companies asking.
You can't drill every matrix variant before the assessment. StealthCoder runs invisibly during screen share and solves whichever variant they throw at you. No browser extension. No detection signature. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code.
Get StealthCoderMatrix problems test your ability to reason about coordinate systems, directional movement, and cell dependencies. Recognition is straightforward: you're given a 2D array and asked to compute, traverse, or modify it. Subtypes cluster into traversal (DFS/BFS across neighbors), pathfinding (optimal routes with constraints), update propagation (changing cells based on distance or state), and hybrid geometry (overlays, borders, state machines). The drill order matters: start with BFS distance (01-matrix), move to valid paths (check-if-there-is-a-valid-path-in-a-grid), then tackle state-heavy DP (cherry-pickup). Google and Microsoft weight these heavily. When you hit an unfamiliar matrix problem under time pressure in a real assessment, StealthCoder reads the grid and constraints, then surfaces the solution in seconds, invisible to the proctor.
Companies that hire most on matrix
146 matrix problems.
You won't drill them all. Pass anyway.
Matrix is one of the patterns interviews actually filter on. Memorizing every variant in a week is a fantasy. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds, no matter which matrix flavor lands in your live OA. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Matrix interview FAQ
How many matrix problems should I drill before a live interview?+
At least 8 to 12 core variants: one BFS distance problem, one pathfinding problem, one DP grid problem, and one update/propagation problem. 146 total problems exist; focus on the subtypes that appear most often at your target companies rather than exhaustive coverage.
Which companies ask matrix problems the most?+
DoorDash (50 problems), Uber (48), and Amazon (47) dominate. Google (43), Microsoft (42), Meta (41), and TikTok (41) are also heavy hitters. If you're interviewing at any of these, matrix mastery is non-negotiable.
How do I recognize a matrix problem during an interview?+
You'll see a 2D array as input, a coordinate system (row, column), and a task involving neighbors, paths, distances, or state changes. Clues include words like 'grid', 'board', 'directions', 'distance from', or 'reachable'. The problem size hint matters too, small grids often hide DP; large ones suggest BFS.
Are matrix problems harder than other patterns?+
Not inherently, but they demand spatial reasoning that doesn't come naturally to everyone. The difficulty spike happens when you combine grids with DP state or multi-constraint pathfinding. A straightforward BFS traversal is medium; cherry-pickup is hard.
What's the most common mistake on matrix problems?+
Off-by-one errors in bounds checking, forgetting to mark visited cells during traversal, and mishandling the coordinate system (row-major vs column-major). Also: assuming all grid problems require DP when BFS or greedy suffices. Trace through small examples first.