Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *nex...
分类:
其他好文 时间:
2015-01-14 15:33:27
阅读次数:
169
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 all valid...
分类:
其他好文 时间:
2015-01-14 14:23:11
阅读次数:
148
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).
For example:
Given binary ...
分类:
其他好文 时间:
2015-01-14 12:52:20
阅读次数:
176
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
For example:
Given binary tree {3,9,20,#,#,15,7},
3
/ 9 20
...
分类:
其他好文 时间:
2015-01-14 11:08:38
阅读次数:
226
首先是1:
Given 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 matrix:
[
[ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8,...
分类:
编程语言 时间:
2015-01-14 09:52:48
阅读次数:
161
分析函数剖析分析函数具有3个基本组成部分, 分区子句, 排序子句以及开窗子句, 基本语法是:function1 (argument1, argument2, …argumentN) over ([partition-by clause] [order-by-clause][windowing-cla...
分类:
其他好文 时间:
2015-01-14 08:28:49
阅读次数:
132
1、join 1.1 OUTER JOIN:想要包含右侧表中的所有行,以及左侧表中有匹配记录的行。 1.11 Mysql中有左连接(left join): SELECT * FROM a LEFT JOIN b ON a.aID =b.bID left join是以A表的记录为基础...
分类:
数据库 时间:
2015-01-14 06:10:46
阅读次数:
206
最近做项目用到了v7包,里面用到了包含v4。当我导入其他library里面也带了v4包导致冲突。网上找了几种解决方法都不行:1.删除其中一个v4包。不行,会报错。2.把其中的一个包拷贝到另一个包所在的位置,将其覆盖。不行,还是会报错。最后终于找个了问题所在,需要把library里order and ...
分类:
移动开发 时间:
2015-01-14 00:31:08
阅读次数:
207
UTF-8编码的文本文档,有的带有BOM (Byte Order Mark, 字节序标志),即0xEF, 0xBB, 0xBF,有的没有。Windows下的txt文本编辑器在保存UTF-8格式的文本文档时会自动添加BOM到文件头。在判断这类文档时,可以根据文档的前3个字节来进行判断。然而BOM不是必需的,而且也不是推荐的。对不希望UTF-8文档带有BOM的程序会带来兼容性问题,例如Java编译器在...
分类:
其他好文 时间:
2015-01-13 23:25:40
阅读次数:
384
问题描述:
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).
For example:
Given ...
分类:
其他好文 时间:
2015-01-13 19:49:51
阅读次数:
152