题目:
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20,#,...
分类:
其他好文 时间:
2015-07-07 09:38:19
阅读次数:
127
题目描述
链接地址
解法题目描述Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the original relative order of the nodes...
分类:
其他好文 时间:
2015-07-07 00:55:14
阅读次数:
116
order bySELECT Company, OrderNumber FROM Orders ORDER BY Company DESC;SELECT Company, OrderNumber FROM Orders ORDER BY Company DESC, OrderNumber ASC;i...
分类:
数据库 时间:
2015-07-07 00:44:36
阅读次数:
305
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 ...
分类:
其他好文 时间:
2015-07-06 23:09:28
阅读次数:
180
今天写了一个统计sql,在一个近亿条数据的表上执行,200s都查不出结果。SQL如下:
select customer,count(1) c
from upv_**
where created between "2015-07-06" and "2015-07-07"
group by customer
having c > 20
order by c desc
执行explain...
分类:
数据库 时间:
2015-07-06 19:52:22
阅读次数:
164
分页的具体讲解讲解请看http://blog.csdn.net/u011225629/article/details/46775947
查看代码打印1 SELECT * FROM table ORDER BY id LIMIT 1000,10;
以上SQL语句在原理上和在实际操作中是不会存在什么问题,但是当table表的数据量达到几十万以上的时候,上面的语句执行一遍,可能会要执行个十几秒的时间...
分类:
数据库 时间:
2015-07-06 18:00:31
阅读次数:
162
Valid Parentheses
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
The brackets must close in the correct order, "()" and "()...
分类:
其他好文 时间:
2015-07-06 17:52:27
阅读次数:
155
Given a set of distinct integers, nums, return all possible subsets.Note:
Elements in a subset must be in non-descending order.
The solution set must not contain duplicate subsets.
For example,
If...
分类:
其他好文 时间:
2015-07-06 17:46:35
阅读次数:
122
问题描述Given a sorted array of integers, find the starting and ending position of a given target value.
Your algorithm’s runtime complexity must be in the order of O(log n).
If the target is not found i...
分类:
其他好文 时间:
2015-07-06 14:23:26
阅读次数:
110
10025 The ? 1 ? 2 ? … ? n = k problem
Given the following formula, one can set operators ‘+’ or ‘-’ instead of each ‘?’, in order to obtain a given k ?1?2?…?n = k
For example: to obtain k = 12, the e...
分类:
其他好文 时间:
2015-07-06 14:21:12
阅读次数:
118