Given a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then right to left for the next level and al...
分类:
其他好文 时间:
2014-07-22 22:53:33
阅读次数:
229
Rotate ListGiven a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3-...
分类:
其他好文 时间:
2014-07-22 22:52:59
阅读次数:
210
$\bf命题:$设$g\left( \lambda \right)$为任意多项式,方阵$A$的最小多项式为$m\left( \lambda \right)$,则$g(A)$可逆的充要条件是$\left( {g\left( \lambda \right),m\left( \lambda \right)...
分类:
其他好文 时间:
2014-07-22 22:52:58
阅读次数:
133
What if the given tree could be any binary tree? Would your previous solution still work?Note:You may only use constant extra space.For example,Given ...
分类:
其他好文 时间:
2014-07-22 08:37:34
阅读次数:
289
【position:absolute】 意思是:他的意思是绝对定位,他默认参照浏览器的左上角,配合TOP、RIGHT、BOTTOM、LEFT(下面简称TRBL)进行定位,有以下属性: 1)如果没有TRBL,以父级的左上角,在没有父级的时候,他是参...
分类:
Web程序 时间:
2014-07-21 10:30:04
阅读次数:
236
普通定位 positiont:static 普通文档流中的元素的position的默认值为static,无需主动声明。忽略top、right、bottom、left和z-index。 相对定位 position:relative .relative{
????position:relative;
??...
分类:
Web程序 时间:
2014-07-21 10:29:18
阅读次数:
249
对于一个二叉搜索树, 要想找到这棵树的最小元素值, 我们只需要从树根开始, 沿着left 孩子指针一直走, 知道遇到NULL(即走到了叶子), 那么这个叶子节点就存储了这棵二叉搜索树的最小元素。 同理, 从根节点开始, 沿着right 孩子指针, 最终找到的是最大关键字的节点。
也就是说寻找BST最小关键字的元素和最大关键字的元素的代码是对称的。伪代码如下:
TREE_MINIMUM(x...
分类:
编程语言 时间:
2014-07-21 09:28:27
阅读次数:
241
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; ...
分类:
其他好文 时间:
2014-07-20 22:05:06
阅读次数:
181
inner join(等值连接) 仅仅返回两个表中联结字段相等的行 left join(左联接) 返回包含左表中的全部记录和右表中联结字段相等的记录right join(右联接) 返回包含右表中的全部记录和左表中联结字段相等的记录INNER JOIN 语法:INNER JOIN 连接两个数据表的使用...
分类:
数据库 时间:
2014-07-19 15:08:52
阅读次数:
250
HDU1754 1 #include 2 3 using namespace std; 4 5 const int MaxSIZE = 2e6 + 10; 6 7 typedef struct { 8 int Max ; 9 int left, right ...
分类:
其他好文 时间:
2014-07-19 09:14:48
阅读次数:
250