二叉树是最常见最重要的数据结构之一,它的定义如下: 二叉树(binary tree)是有限多个节点的集合,这个结合或者是空集,或者由一个根节点和两颗互不相交的、分别称为左子树和右子树的二叉树组成。 二叉树最基本的操作是遍历:一般约定遍历时左节点优先于右节点,这样根据根节点的遍历顺序可分为三种...
分类:
其他好文 时间:
2014-06-28 23:50:46
阅读次数:
631
SQL截取字符串SUBSTRING返回字符、binary、text或 image表达式的一部分。有关可与该函数一起使用的有效 Microsoft® SQL Server™数据类型的更多信息,请参见数据类型。语法SUBSTRING ( expression , start , le...
分类:
数据库 时间:
2014-06-28 21:15:18
阅读次数:
345
①使用binary_search前要先保证有序②binary_search函数仅返回true或false③
分类:
其他好文 时间:
2014-06-21 12:49:50
阅读次数:
202
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:
其他好文 时间:
2014-06-18 13:29:31
阅读次数:
214
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-06-18 12:51:52
阅读次数:
205
RPM是RedHat Package Manager(RedHat软件包管理工具)类似Windows里面的“添加/删除程序”rpm 执行安装包二进制包(Binary)以及源代码包(Source)两种。二进制包可以直接安装在计算机中,而源代码包将会由RPM自动编译、安装。源代码包经常以src.rpm作...
分类:
其他好文 时间:
2014-06-18 12:49:53
阅读次数:
238
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-06-18 12:32:58
阅读次数:
169
终端输入md5sum --help:md5sum --help用法:md5sum [选项]... [文件]...显示或检查 MD5(128-bit) 校验和。若没有文件选项,或者文件处为"-",则从标准输入读取。-b, --binary 以二进制模式读取-c, --check 从文件中读取MD5.....
分类:
其他好文 时间:
2014-06-18 08:20:03
阅读次数:
199
二叉树的插入与删除,来自Mark Allen Weiss的《数据结构与算法分析》。# Definition for a binary tree nodeclass TreeNode: def __init__(self, x): self.val = x self...
分类:
编程语言 时间:
2014-06-17 14:25:01
阅读次数:
291
简单来说,就是二叉树的前序、中序、后序遍历,包括了递归和非递归的方法前序遍历(注释中的为递归版本): 1 #include 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 struct TreeNode 9 {1...
分类:
其他好文 时间:
2014-06-17 12:53:42
阅读次数:
416