码迷,mamicode.com
首页 >  
搜索关键字:binary tree depth    ( 24091个结果
CMake VS工程总结
1.设置输出后缀set(CMAKE_DEBUG_POSTFIX "d")2.设置输出目录set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINA...
分类:其他好文   时间:2014-07-07 09:31:04    阅读次数:1031
Leetcode Populating Next Right Pointers in Each Node II
Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution stil...
分类:其他好文   时间:2014-07-03 20:34:46    阅读次数:193
LeetCode:Same Tree
Same Tree 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 i...
分类:其他好文   时间:2014-07-02 17:56:50    阅读次数:205
树、二叉树基础
前面介绍的栈、队列都是线性结构(linear structure)。而树是非线性结构(non-linear structure)。因此,树中的元素之间一般不存在类似于线性结构的一对一的关系,更多地表现为多对多的关系。直观地看,它是数据元素(在树中称为节点)按分支关系组织起来的结构。显然,树形结构是比线性结构更复杂的一种数据结构类型。树的定义:树是含有n个节点的有穷集合,其中有一个节点比较特殊称为根节点。在图示树时,用一条边连接两个有逻辑关系的节点,这个关系被称为父子关系。二叉树(Binary Tree)由节...
分类:其他好文   时间:2014-07-02 16:44:33    阅读次数:183
mxGraph定位盲区图形到绘图区域中心位置
往往在一个绘图区域会有很多个图形,如果通过右键拖动画布或者通过滚动条来查找,是一件很烦人的事情。下面我就给出解决这个问题的方案。 前提是有一个整个绘图区域的tree或者datagrid,我们需要选择直接要定位的图形cell。 首先我们需要一个mxGraph的全局对象,暂且就定义为ylEditor.ylCanvas吧。 接下来我们要定义一个查找图形cell的方法,只有通过这个方法,才能找到画布...
分类:其他好文   时间:2014-07-02 15:26:39    阅读次数:547
[leetcode] Gray Code
The gray code is a binary numeral system where two successive values differ in only one bit.
分类:其他好文   时间:2014-07-02 14:47:43    阅读次数:253
[LeetCode]Same Tree
[LeetCode]Same Tree...
分类:其他好文   时间:2014-07-02 11:51:25    阅读次数:195
ACM:二分查找,以及利用二分法来找上下界
(一)二分的模版: int binary_search(int *array, int length, int key) { int start = 0, end = length - 1; while(end >= start) { int middle = start + (end - start) / 2; int tmp = array[middle]; if(tmp <...
分类:其他好文   时间:2014-07-02 08:19:05    阅读次数:211
[LeetCode]Maximum Depth of Binary Tree
[LeetCode]Maximum Depth of Binary Tree...
分类:其他好文   时间:2014-07-02 08:09:01    阅读次数:175
leetcode-Symmetric Tree 对称树
判断一个二叉树是否是轴对称的是一个经典的算法问题,下面结合leetcode上的Symmetric Tree给出判断对称树的两种方法。       先看看问题描述: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, t...
分类:其他好文   时间:2014-07-02 06:58:05    阅读次数:208
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!