โ† Amazon questions

Construct matrix based on row/column conditions

Filed under Amazon

Given a binary matrix, construct a new matrix where result[i][j] = 1 if every element in the ith row and jth column of the original matrix is 1, using constant extra space.

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.