Capital One Senior+ Software Engineer Interview Experience — A Tetris-Style Grid Placement OA Question

Capital One·Software Engineer·Feb 2026
Online AssessmentSenior+medium

There's an n x m grid of squares, and I need to draw a pattern on it. The pattern is made up of several fixed block shapes, kind of like Tetris. The problem gave 5 figure types: A, B, C, D, E.

For A: in a 2x2 square, it only occupies the top-left, top-right, and bottom-left cells. So A is:

[1, 0, 1]
[1, 1, 1]

That is, a U-shape / concave shape with the top-middle cell empty. This should go by the example matrix — for this kind of CodeSignal question, you usually go by however the shapes are defined in the problem body.

A [[1]]
B [[1, 1, 1]]
C [[1, 1],
   [1, 1]]
D [[1, 0],
   [1, 1],
   [1, 0]]
E [[0, 1, 0],
   [1, 1, 1]]

You return an n x m integer matrix, grid. Rules:

  1. It starts out all 0.
  2. After the i-th shape is placed, fill the cells it occupies with the number i+1.
  3. Cells where nothing fits stay 0.

My rough approach was, for each figure: enumerate its possible top-left positions (r, c), check whether it can be placed there, find the first valid position, and fill the corresponding cells with the current figure's number.

Published

Curated and edited by PracHub

Practice the questions from this interview

Discussion

Sign in to join the discussion. The author is notified of every comment.

Loading comments…

Interview at a glance

Company
Capital One
Role
Software Engineer
Level
Senior+
Rounds
Online Assessment
Difficulty
medium
Interview date
Feb 2026
Questions from this interview
1 question

Real Capital One interview experiences

First-hand reports from Capital One candidates — the rounds, the questions they were asked, and how it went.

All 68 Capital One interview experiences