题目:
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.
You may assume no duplicates in t...
分类:
其他好文 时间:
2015-03-30 13:27:14
阅读次数:
100
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.
For example:
Given the below binary tree and sum = 22,
5
/ \...
分类:
其他好文 时间:
2015-03-30 13:14:32
阅读次数:
89
SELECT * from aa WHERE aa not in(2,3) and aa not in(SELECT aa from aa where bb =1 and cc is null);(SELECT * from aa where bb not in (1,2,3)) UNION all...
分类:
数据库 时间:
2015-03-30 13:07:45
阅读次数:
115
在实际工作中,经常会遇到这样的需求:定期对已经过期的数据进行删除,释放服务器资源。例如,我们定义了一个定时器任务,在凌晨2点开始执行,这个任务就是删除1个月之前的数据,以释放空间。 最初的时候,我们可以这么写: delete from table_name where t_time < to...
分类:
数据库 时间:
2015-03-30 13:00:05
阅读次数:
176
在mysql有关键字group_concat提供了类似的功能,在oracle中类似功能关键字是wm_concat.比如我有如下查询数据:
但是我希望能够显示成一行查询出来,结果图如下:
关键sql代码形如:select t.sglcheckid,**wm_concat(t.salemodulename)** from t_item_group_ex t where t.sglchecki...
分类:
数据库 时间:
2015-03-30 11:24:53
阅读次数:
174
Path Sum IIGiven a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tr...
分类:
其他好文 时间:
2015-03-30 10:52:04
阅读次数:
158
题目链接:gas-station
/**
*
There are N gas stations along a circular route, where the amount of gas at station i is gas[i].
You have a car with an unlimited gas tank and it costs cost[i] of ...
分类:
其他好文 时间:
2015-03-30 09:25:15
阅读次数:
163
1422. Table Tennis
Constraints
Time Limit: 1 secs, Memory Limit: 32 MB
Description
There is a rectangular pool table ABCD with side lengths m and n, where m and n are integers with m...
分类:
其他好文 时间:
2015-03-30 09:20:57
阅读次数:
179
1936. Knight Moves
Constraints
Time Limit: 1 secs, Memory Limit: 32 MB
Description
A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the s...
分类:
其他好文 时间:
2015-03-30 09:20:21
阅读次数:
121
2002. Feeding Time
Constraints
Time Limit: 1 secs, Memory Limit: 292.96875 MB
Description
It's Bessie's feeding time, and Farmer John is trying to decide where to put her. FJ has a f...
分类:
其他好文 时间:
2015-03-30 09:18:39
阅读次数:
157