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 ru...
分类:
其他好文 时间:
2014-06-04 20:13:41
阅读次数:
350
题目:Problem DescriptionGiven a two-dimensional
array of positive and negative integers, a sub-rectangle is any contiguous
sub-array of size 1 x 1 or gr...
分类:
其他好文 时间:
2014-05-31 11:35:43
阅读次数:
271
DescriptionLet us consider sets of positive
integers less than or equal ton. Note that all elements of a set are different.
Also note that the order o...
分类:
其他好文 时间:
2014-05-31 05:12:49
阅读次数:
246
java.util.TimerTask类的执行周期period变量的声明如下: /** *
Period in milliseconds for repeating tasks. A positive value indicates *
fixed-rate executio...
分类:
其他好文 时间:
2014-05-29 09:30:12
阅读次数:
245
题目链接题意: find the maximum positive difference
between the price on the ith day and the jth day附上代码: 1 class Solution { 2
public: 3 int maxProfit(ve...
分类:
其他好文 时间:
2014-05-28 03:49:45
阅读次数:
307
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 ru...
分类:
其他好文 时间:
2014-05-26 09:43:14
阅读次数:
220
题目:2520 is the smallest number that can be
divided by each of the numbers from 1 to 10 without any remainder.What is the
smallest positive number that...
分类:
其他好文 时间:
2014-05-26 02:12:53
阅读次数:
167
Sum of Consecutive Prime NumbersTime Limit:
1000MSMemory Limit: 65536KTotal Submissions: 18427Accepted: 10122DescriptionSome
positive integers can be....
分类:
其他好文 时间:
2014-05-24 10:32:00
阅读次数:
266
Smallest multiple
Problem 5
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
What is the smallest positive number that is evenly di...
分类:
其他好文 时间:
2014-05-23 01:51:13
阅读次数:
261
【题目】
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 space.
【题意】
给定一个数组,找出第一个缺失的正数。时间复杂度O(n)
...
分类:
其他好文 时间:
2014-05-21 17:13:07
阅读次数:
219