Problem Description: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...
分类:
其他好文 时间:
2014-07-07 16:05:24
阅读次数:
229
Problem Description:Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more diction...
分类:
其他好文 时间:
2014-07-07 16:02:11
阅读次数:
219
Problem Description:Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1...
分类:
其他好文 时间:
2014-07-07 15:54:24
阅读次数:
193
Problem Description: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...
分类:
其他好文 时间:
2014-07-07 15:24:41
阅读次数:
212
Problem Description:Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most...
分类:
其他好文 时间:
2014-07-07 15:24:05
阅读次数:
206
Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more dictionary words.For exampl...
分类:
其他好文 时间:
2014-07-01 23:43:03
阅读次数:
293
引自http://blog.csdn.net/lejuo/article/details/4479065ID自动增加,就像MS- SQL Server里面创建表格时,给表的主键设置为自动增加一样。在Oracle里面,通过如下的SQL语句实现:(plsql可以直接在sequence创建)-- Crea...
分类:
数据库 时间:
2014-06-30 22:03:30
阅读次数:
274
SELECT ID,FORMNAME,NODENAME,SEQUENCE, NAME, STATE, NOWTIMES, WORK.FQREALNAME||'('||FQDEPT.FULLNAME||')' AS FQREALNAME, NVL2(WORK.BHREALNAME,WORK.BHR.....
分类:
数据库 时间:
2014-06-30 20:45:24
阅读次数:
247
【题目】
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.
For example, given
s = "leetcode",
dict = ["leet", "code"].
Return true because "leetcode" can be segm...
分类:
其他好文 时间:
2014-06-30 09:02:26
阅读次数:
276
题目链接:http://poj.org/problem?id=2442
题目大意:给出一个m*n的矩阵,从每一行中取出一个数相加,能得到n^m个不同的结果,要求输出其中前n项。
建立一个以n元数组为底层数组的堆,在这里,利用stl中的make_heap,pop_heap,push_heap等函数解决。
1.将第一组数据输入arr1数组,升序排序。
2.将接下来的数据输入到arr2数组中,并...
分类:
其他好文 时间:
2014-06-29 23:25:31
阅读次数:
259