
array
yanrui92
这个作者很懒,什么都没留下…
展开
-
leetcode-first missing element
Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm should run in O(n) time and uses constant原创 2015-01-20 11:10:17 · 395 阅读 · 0 评论 -
leetcode-set Matrix Zero
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.public class Solution { public void setZeroes(int[][] matrix) { int[] row=new int[matrix.le原创 2015-02-19 10:23:53 · 360 阅读 · 0 评论