Matrix and Grid Tasks
Task three on Capital One's CodeSignal assessment is usually a matrix or a grid. You get a board and a set of rules, and you apply them exactly, often many times over. The code runs long for an assessment task, and most bugs hide in the bookkeeping.
Two habits prevent most of those bugs. Read the grid's shape again every time you touch it, because a rotation turns a 2 x 3 grid into a 3 x 2 one and a stale row count reads past the edge. And write changes into a new grid or a marked set, since changing cells you haven't finished reading is the other common bug.
Speed matters less than you might expect. These grids top out around 500 cells a side, so nested loops pass, and you can finish the simulation first and tune it later. For any search across the grid, use a queue, because Python stops near a thousand nested calls. Before you chain helpers together, try each one on a small grid that isn't square.
Capital OnePremium lesson · Coding round
The 5 Capital One problems are below.
- A Premium questionCoding · Medium · Frequently asked
- A Premium questionCoding · Medium
- A Premium questionCoding · Medium
+ 2 more in this lesson
Each with hints, the follow-up and a tested solution.
Get the Capital One questions$49 a year · all 100 companies · cancel anytime
From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.
Capital One interview guideKnow what Capital One asks before you walk in.
29 coding · 2 system design · 30 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.