Looking for good programming challenges?

Use the search below to find our solutions for selected questions!

Archive for November 2019

Set Matrix Zeroes

Problem Statement Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place. Example 1: Input: [ [1,1,1], [1,0,1], [1,1,1] ] Output: [ [1,0,1], [0,0,0], [1,0,1] ] Solution We will use the first cell of every row and column . . . Read more