You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link...
分类:
其他好文 时间:
2015-01-27 09:29:46
阅读次数:
186
1.not in方法select top 10 from books where id not in(select top 30 id from books)2.row_number()函数select * from (select *,row_number() over (order by id)...
分类:
数据库 时间:
2015-01-27 09:15:01
阅读次数:
145
Details not refined yet..struct Ret{ Ret(TreeNode *p, Mask rm) : pVal(p), m(rm){} TreeNode *pVal; Mask m;};class Solution {public: Ret lca...
分类:
其他好文 时间:
2015-01-27 07:03:07
阅读次数:
193
题目:
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
我的解法:
(1)算法思想:
二分法,数组的中间点为根节点,然后递归。
(2)代码如下:
{CSDN:CODE:589537}...
分类:
其他好文 时间:
2015-01-26 19:21:31
阅读次数:
136
Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat...
分类:
其他好文 时间:
2015-01-25 22:33:24
阅读次数:
150
1、ORDER BY 中关于NULL的处理缺省处理,Oracle在Order by 时觉得null是最大值,所以假设是ASC升序则排在最后,DESC降序则排在最前。当然,你也能够使用nulls first 或者nulls last 语法来控制NULL的位置。Nulls first和nulls las...
分类:
其他好文 时间:
2015-01-25 20:54:33
阅读次数:
110
http://poj.org/problem?id=1094
Description
An ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to larges...
分类:
编程语言 时间:
2015-01-25 19:39:31
阅读次数:
185
Given a string containing only digits, restore it by returning all possible valid IP address combinations.
For example:
Given "25525511135",
return ["255.255.11.135", "255.255.111.35"]. (Order ...
分类:
其他好文 时间:
2015-01-25 18:19:01
阅读次数:
219
题目:
Given a string containing just the characters '(', ')', '{', '}', '[' and ']',
determine if the input string is valid.
The brackets must close in the correct order, "()" and "()[]{}" are...
分类:
其他好文 时间:
2015-01-25 16:44:04
阅读次数:
136
Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "inside jobs" where employees collaborate with gambler...
分类:
系统相关 时间:
2015-01-25 11:13:05
阅读次数:
228