โ† HSBC questions
CodingEasy

Modify 2D matrix in-place based on 1 elements

Filed under HSBC

Given an M x N matrix, modify it in-place such that if any element is 1, its entire corresponding row and column are set to 1. This must be achieved with minimal 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 HSBC questions

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