标签:style blog http color java strong io for
题目:
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.
Did you use extra space?
A straight forward solution using O(mn) space is probably a bad idea.
A simple improvement uses O(m + n) space, but still not the best solution.
Could you devise a constant space solution?
题解:
这道题是CC150 1.7上面的原题。可以看上面详尽的解释,我就不写了。
代码如下:
Set Matrix Zeroes leetcode java,布布扣,bubuko.com
Set Matrix Zeroes leetcode java
标签:style blog http color java strong io for
原文地址:http://www.cnblogs.com/springfor/p/3888003.html