LeetCode 73 Set Matrix Zeroes

chi633發表於2017-12-21

Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. click to show follow up. Subscribe to see which companies asked this question. 給定一個m×n矩陣,如果一個元素是0,則將其所在行和列全部元素變成0。 需要在原矩陣上完成操作。 樣例 給出一個矩陣 [ [1, 2], [0, 3] ] 返回 [ [0, 2], [0, 0] ]

相關文章