Description :Given a singly linked list where
elements are sorted in ascending order, convert it to a height balanced
BST.分析:这道题目简单版是把一个排序好的数组转成平衡的二叉树...
分类:
其他好文 时间:
2014-06-16 10:51:54
阅读次数:
237
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 matter what you leave beyond the new length.
中...
分类:
其他好文 时间:
2014-06-10 18:41:04
阅读次数:
191
附网址:http://qt-project.org/doc/qt-5/qtquick-usecase-visual.html
Use Case - Visual Elements In QML
—— 用例 - QML中的可视化元素
The Rectangle Type —— 矩形
对于最基本的视觉元素,Qt Quick提供了Rectangle类型来绘制矩形。这些矩形可以使...
分类:
其他好文 时间:
2014-06-10 17:21:33
阅读次数:
399
Given a singly linked list where elements are
sorted in ascending order, convert it to a height balanced BST.public class
Solution { /** Convert th...
分类:
其他好文 时间:
2014-06-10 00:22:44
阅读次数:
259
题目
Two elements of a binary search tree (BST) are swapped by mistake.
Recover the tree without changing its structure.
Note:
A solution using O(n)
space is pretty straight forward. Cou...
分类:
其他好文 时间:
2014-06-08 15:32:45
阅读次数:
245
题目
Given a collection of integers that might contain duplicates, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not c...
分类:
其他好文 时间:
2014-06-08 05:32:21
阅读次数:
196
题目
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 matter what you leave beyond the new length.
原题链接(点我)
解题思路
给一个数组和一个数字,移除该数字在数组中所有出现的地方。
这是一个非常简单的题目,应...
分类:
其他好文 时间:
2014-06-08 04:05:50
阅读次数:
284
题目
Given a set of distinct integers, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.
...
分类:
其他好文 时间:
2014-06-08 04:01:05
阅读次数:
240
Spiral MatrixGiven a matrix of m x n elements
(m rows, n columns), return all elements of the matrix in spiral order.For
example, Given the following ...
分类:
其他好文 时间:
2014-06-07 22:57:31
阅读次数:
236