Given a binary tree struct TreeLinkNode {
TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next
pointe...
分类:
其他好文 时间:
2014-07-22 23:16:35
阅读次数:
373
今天继续攒人品。。。真开心啊O(∩_∩)O~~各种身体不舒服~~https://icpcarchive.ecs.baylor.edu/external/65/6577.pdf题意是这样的,现在有一个向下无限延伸的二叉树。然后输入起点(通过只含LRU的字符串S,从根结点开始执行)。LRU分别表示往左儿...
分类:
其他好文 时间:
2014-07-22 23:15:54
阅读次数:
550
What is the Execution Context & Stack in
JavaScript?In this post I will take an in-depth look at one of the most
fundamental parts of JavaScript, theE...
分类:
编程语言 时间:
2014-07-22 23:12:16
阅读次数:
608
/** * Definition for binary tree * struct
TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) :
val(x), left(...
分类:
其他好文 时间:
2014-07-22 23:07:34
阅读次数:
312
Given a binary tree, find its maximum depth.The
maximum depth is the number of nodes along the longest path from the root node
down to the farthest le...
分类:
其他好文 时间:
2014-07-22 23:07:13
阅读次数:
379
Definition: see
wikihttp://en.wikipedia.org/wiki/Binary_search_tree 1 /* 2 This look up is a
fast operation because you eliminate the half 3 t...
分类:
其他好文 时间:
2014-07-22 23:06:34
阅读次数:
330
Given two binary trees, write a function to
check if they are equal or not.Two binary trees are considered equal if they are
structurally identical an...
分类:
其他好文 时间:
2014-05-01 16:06:46
阅读次数:
427
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...
分类:
其他好文 时间:
2014-05-01 14:38:39
阅读次数:
454
Camera属性中有个Viewport Rect,如下图:X、Y为(0,
0)代表左下角,(1,
1)代表右上角;W和H分别是Viewport的宽(Width)和高(Height),摄像机的Aspect参数(下一段提到)由W、H以及窗口的长宽比共同决定。通过设置这4个参数以及深度(Depth),可以...
分类:
其他好文 时间:
2014-04-30 20:33:13
阅读次数:
514
2014-04-29
00:15题目:将二叉搜索树展开成一个双向链表,要求这个链表仍是有序的,而且不能另外分配对象,就地完成。解法:Leetcode上也有,递归解法。代码: 1 //
17.13 Flatten a binary search tree into a doubly linked li...
分类:
其他好文 时间:
2014-04-29 14:51:49
阅读次数:
460