Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.TreeNode *createSearchTree(ListNode *&hea...
分类:
其他好文 时间:
2014-06-26 00:12:57
阅读次数:
289
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number...
分类:
其他好文 时间:
2014-06-25 22:07:58
阅读次数:
330
SQL Server 2005引入的新方法。1 SELECT * FROM (SELECT ROW_NUMBER() OVER(ORDER BY keyField DESC) AS rowNum, * FROM tableName) AS t WHERE rowNum > start[比如:90] ...
分类:
数据库 时间:
2014-06-25 21:17:08
阅读次数:
256
在官方文档中,看到这句。但不明白什么意思。let vegetable = "red pepper"switch vegetable { case "celery": let vegetableComment = "Add some raisins and make...
分类:
其他好文 时间:
2014-06-24 22:52:30
阅读次数:
400
location.href="url?p="+"value";onclick="location.href='Card_query_where?query_id='+query_id.value"
分类:
其他好文 时间:
2014-06-24 12:35:22
阅读次数:
197
Given a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->...
分类:
其他好文 时间:
2014-06-24 12:00:32
阅读次数:
142
SELECT id FROM tran WHERE state = 'F' AND TIMESTAMPDIFF(SECOND,DATE_ADD(create_date,INTERVAL 10 DAY_MINUTE),"2014-06-18 10:30:29")>0
如果create_date加10分钟大于等于当前的时间("2014-06-18 10:30:29")...
分类:
数据库 时间:
2014-06-22 22:42:25
阅读次数:
284
在编写SQL语句时,如果要实现一张表有而另外一张表没有的数据时, 通常第一直觉的写法是:
select * from table1 where table1.id not in(select id from table2)
这种写法虽然看起来很直观,但是执行的效率会非常低下,在数据量很大的时候效果尤其明显,我们推荐使用not exists或左连接来代替。
select a.* from ta...
分类:
数据库 时间:
2014-06-22 16:36:50
阅读次数:
244
Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ...
分类:
其他好文 时间:
2014-06-22 10:45:17
阅读次数:
258
在此发现一个oracle漏动,eg:
DELETE JEW_LOG WHERE C_ID IN (SELECT C_ID FROM BAS_BATCHNO WHERE C_WARID='028' AND C_BATCHNOTYPE='P')
在这个DELETE 语句中子查询是报错的因为没有C_ID这个字段、所以JEW_LOG这张表就糟殃了数据98292条记录直接被删除、幸亏一直以来养成的好...
分类:
其他好文 时间:
2014-06-22 07:56:10
阅读次数:
400