摘要:
Given an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Your algorithm should run inO(n)time and uses constant space.ref:http://www.cnblogs.com/AnnieKim/archive/2013/04/21/3034631.html虽然不能再另外开辟非常数级的额外空间,但是可以在输入数组上就地进行swap操作。思路:交换数 阅读全文
posted @ 2014-01-24 02:52
Razer.Lu
阅读(218)
评论(0)
推荐(0)

浙公网安备 33010602011771号