โ† Amazon questions

Rook Attackable Squares

Filed under Amazon

Given an N x N matrix representing a chessboard with rooks (1) and empty spaces (0), update the matrix such that any cell in the same row or column as a rook becomes 1.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.