Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.难度70,与Convert Sorted Array to Binary Sear...
分类:
其他好文 时间:
2014-09-08 06:26:16
阅读次数:
263
public class Solution { public boolean searchMatrix(int[][] matrix, int target) { int low=0, high=matrix.length-1; while (low target)...
分类:
其他好文 时间:
2014-09-08 00:58:06
阅读次数:
347
之前为大家分享了css3实现的加载动画。今天为大家带来一款只需几行代码就可以实现超炫的动画加载特效。我们一起看下效果图: 在线预览源码下载实现代码:极简的html代码: css3代码:body { background: black; display: -webkit-box; ...
分类:
Web程序 时间:
2014-09-07 23:43:45
阅读次数:
302
最近经常玩腾讯微博,出来职业习惯,看看它的CSS,里面运用了大量的css3的东东,有一处用到了Data URI,还有css expression有争议的地方,对png24图片的处理也是用滤镜,类似(padding-top:2px\0)欠考虑!看了腾讯的,下午就学了一下css3的东东!打算以后的项目...
分类:
Web程序 时间:
2014-09-07 16:00:25
阅读次数:
227
深度优先搜索算法(depth first search),是一个典型的图论算法。所遵循的搜索策略是尽可能“深”地去搜索一个图。算法思想是: 对于新发现的顶点v,如果它有以点v为起点的未探测的边,则沿此边继续探测下去。当顶点v的所有边都已被探寻结束,则回溯到到达点v的先辈节点。以相同方法一直回溯到源....
分类:
其他好文 时间:
2014-09-07 15:55:45
阅读次数:
208
sign up google developer console, create project, generate API keyhttp://stackoverflow.com/questions/4082966/google-web-search-api-deprecated-what-now...
Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l...
分类:
其他好文 时间:
2014-09-07 10:58:14
阅读次数:
185
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.For example,Given n = 3, your program should return all ...
分类:
其他好文 时间:
2014-09-07 07:38:14
阅读次数:
315
Word Search
Given a 2D board and a word, find if the word exists in the grid.
The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those...
分类:
其他好文 时间:
2014-09-06 22:34:14
阅读次数:
261
整合两道差不多的题目放上来,其中第一题是第二题的基础。
1.
Given a binary tree, determine if it is height-balanced.
For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two...
分类:
其他好文 时间:
2014-09-06 21:21:03
阅读次数:
279