Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Set Matrix Zeroes

Medium Matrix

If an element of an R x C matrix is 0, set its entire row and column to 0. Print the resulting matrix.

Constraints

1 <= R, C <= 200 -2^31 <= value <= 2^31 - 1

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.