【Culling & Depth Testing】 Culling is an optimization that does not render polygons facing away from the viewer. All polygons have a front and a back ....
分类:
其他好文 时间:
2014-07-23 20:41:25
阅读次数:
247
void build(int l, int r, int n) //建树
{
int mid;
tree[n].l = l;
tree[n].r = r;
if(l==r)
{
tree[n].sum = h[l];
return ;
}
mid = (l+r)>>1;
build(l, mid, 2*n);
build(mid+1, r, 2*n+1);
tree[n].sum = tree[2*n].sum + tree[2*n+1].sum;
}...
分类:
其他好文 时间:
2014-07-23 18:11:36
阅读次数:
282
介绍还有一种平衡二叉树:红黑树(Red Black Tree),红黑树由Rudolf Bayer于1972年发明,当时被称为平衡二叉B树(symmetric binary B-trees),1978年被Leonidas J. Guibas和Robert Sedgewick改成一个比較摩登的名字:红黑...
分类:
其他好文 时间:
2014-07-23 15:16:46
阅读次数:
375
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:
其他好文 时间:
2014-07-23 15:06:06
阅读次数:
320
今天在做项目开发时遇到这么一个错误,完整的错误提示信息如下:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tony.timepicker/com.tony.timepicker.MainActivity}...
分类:
移动开发 时间:
2014-07-23 14:55:57
阅读次数:
328
题目大意:
给出一棵树,树上每个节点都有权值,然后有两个操作。
1 x val 在结点x上加上一个值val,x的儿子加上 -val,x的儿子的儿子加上 - (-val),以此类推。
2 x 问x节点的值。
思路分析:
每个节点上加值都是给自己的儿子节点加,而且这个是颗树。
比如样例上的,如果你给node 1加一个值,那么五个节点都加。
再给node 2加个值,2的儿子节点也加...
分类:
其他好文 时间:
2014-07-23 13:19:26
阅读次数:
272
树形结构的数据库表Schema设计 程序设计过程中,我们常常用树形结构来表征某些数据的关联关系,如企业上下级部门、栏目结构、商品分类等等,通常而言,这些树状结构需要借助于数据库完成持久化。然而目前的各种基于关系的数据库,都是以二维表的形式记录存储数据信息,因此是不能直接将Tree存入DBMS,设计合...
分类:
数据库 时间:
2014-07-23 12:12:06
阅读次数:
404
Another textbook problem. We take back of postorder array as the current root, and then we can split the inorder array: 1st half for current right chi...
分类:
其他好文 时间:
2014-07-23 12:01:56
阅读次数:
210
A collegiate textbook problem. Nothing special, but just take care of your memory use.class Solution {public: TreeNode *_buildTree(int pre[], int &...
分类:
其他好文 时间:
2014-07-23 12:00:46
阅读次数:
248
Swift与Objective-C混用简明教程转载自:https://github.com/lifedim/SwiftCasts/tree/master/000_mix_swift_objc我想很多iOS开发者在知道Swift后,心中最大的问题就是如何将Swift应用到原有项目之中。下面我将简要介绍...
分类:
移动开发 时间:
2014-07-23 11:35:46
阅读次数:
265