Given an unsorted array of integers, find the
length of the longest consecutive elements sequence.For example,Given[100, 4,
200, 1, 3, 2],The longest ...
分类:
其他好文 时间:
2014-05-10 20:06:26
阅读次数:
404
Problem DescriptionGiven n integers.You have two
operations:U A B: replace the Ath number by B. (index counting from 0)Q A B:
output the length of the...
分类:
其他好文 时间:
2014-05-06 01:20:33
阅读次数:
332
Say you have an array for which theithelement
is the price of a given stock on dayi.Design an algorithm to find the maximum
profit. You may complete a...
分类:
其他好文 时间:
2014-05-06 00:51:29
阅读次数:
353
Problem DescriptionFor a sequence S1, S2, ... , SN,
and a pair of integers (i, j), if 1 2 #include 3 #include 4 #include 5 using
namespace std...
分类:
其他好文 时间:
2014-05-05 23:50:08
阅读次数:
445
Given an unsorted array of integers, find the
length of the longest consecutive elements sequence.For example,Given [100, 4,
200, 1, 3, 2],The longest...
分类:
其他好文 时间:
2014-05-05 23:01:41
阅读次数:
374
Artificial Intelligence?
Physics teachers in high school often think that problems given as text are more demanding than pure computations. After all, the pupils have to read and underst...
分类:
其他好文 时间:
2014-05-02 23:39:35
阅读次数:
485
题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3749
Chameleon
Time Limit: 6 Seconds Memory Limit: 65536 KB
Given n groups of integers(all the integers are distin...
分类:
其他好文 时间:
2014-05-02 19:06:34
阅读次数:
447
SubsetsGiven a set of distinct integers,S,
return all possible subsets.Note:Elements in a subset must be in non-descending
order.The solution set must...
分类:
其他好文 时间:
2014-05-02 16:39:15
阅读次数:
315
Where's Waldorf?
Given a m by n grid
of letters, ( ),
and a list of words, find the location in the grid at which the word can be found. A word matches a straight, uninterrupted line o...
分类:
其他好文 时间:
2014-05-02 10:59:15
阅读次数:
514
Write an efficient algorithm that searches for
a value in anmxnmatrix. This matrix has the following properties:Integers in
each row are sorted from l...
分类:
其他好文 时间:
2014-05-02 10:41:53
阅读次数:
267