注:能用STL就尽量用STL 平衡二叉树(Balanced Binary Tree),又根据它的发明者命名为AVL树。 它或者是一颗空树,或者具有以下性质的二叉树:它的左子树和右子树的深度之差的绝对值不超过1,且它的左子树和右子树都是一颗平衡二叉树。 平衡因子(bf):结点的左子树的深度减去右子树的... ...
分类:
其他好文 时间:
2016-04-05 19:57:43
阅读次数:
365
The structure of Segment Tree is a binary tree which each node has two attributesstart and end denote an segment / interval. start and end are both in ...
分类:
其他好文 时间:
2016-04-05 19:15:20
阅读次数:
134
The structure of Segment Tree is a binary tree which each node has two attributesstart and end denote an segment / interval. start and end are both in ...
分类:
其他好文 时间:
2016-04-05 19:13:58
阅读次数:
143
Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), retur ...
分类:
其他好文 时间:
2016-04-05 07:07:21
阅读次数:
131
本人原创,如有错误恳请指正,谢谢!
原题网址https://leetcode.com/problems/count-complete-tree-nodes/
Given a complete binary tree, count the number of nodes.
Definition of a complete binary tree from Wikipedia:
I...
分类:
其他好文 时间:
2016-04-04 18:14:44
阅读次数:
259
做iOS的二维码扫描,有两个第三方库可以选择,ZBar和ZXing。今天要介绍的是iOS7.0后AVFoundation框架提供的原生二维码扫描。 首先需要添加AVFoundation.framework框架到你工程中build phase的"Link Binary With Libraries"之 ...
分类:
移动开发 时间:
2016-04-04 14:32:29
阅读次数:
189
题目描述: Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example,Given n = 3, there are a total of 5 uniqu ...
分类:
编程语言 时间:
2016-04-03 20:18:55
阅读次数:
170