在上一篇:二叉树基本操作 中,我们描述了二叉树的递归遍历函数。在这里主要是给出这些函数的测试代码,为了测试更加方便,我们实现了三个新的函数:建立二叉树、统计二叉树叶子节点数量、统计二叉树总节点数量。(二叉树的定义用上篇文章中的定义) 二叉树建立: 1 tree_pointer create_b...
分类:
其他好文 时间:
2014-06-28 22:22:38
阅读次数:
232
SQL截取字符串SUBSTRING返回字符、binary、text或 image表达式的一部分。有关可与该函数一起使用的有效 Microsoft® SQL Server™数据类型的更多信息,请参见数据类型。语法SUBSTRING ( expression , start , le...
分类:
数据库 时间:
2014-06-28 21:15:18
阅读次数:
345
eq(index):将集合中的索引为index的元素提取出来. first():返回集合中的第一个元素. .last():防护集合中的最后一个元素. .slice(start[,end]):返回集合中的给定区间段的元素. first()和las...
分类:
Web程序 时间:
2014-06-28 20:12:13
阅读次数:
256
NodeJS入门来源于:http://www.nodebeginner.org/index-zh-cn.html作者:Manuel Kiessling翻译:goddyzhao&GrayZhang&ondayChen关于本书致力于教会你如何用Node.js来开发应用,过程中会传授你所有所需的“高级”J...
分类:
Web程序 时间:
2014-06-21 13:48:12
阅读次数:
422
前面一篇"帝国cms面包屑导航的首页链接锚文本改成关键字"中xmyanke有写到改首页链接的方法,但是感觉比较麻烦,这里就说说如何删除帝国cms面包屑导航中首页链接的/index.html,我们的首页一般都是***.com/结尾的,如果Breadcrumb的中首页链接变成***.com/inde.....
分类:
Web程序 时间:
2014-06-21 12:59:19
阅读次数:
238
①使用binary_search前要先保证有序②binary_search函数仅返回true或false③
分类:
其他好文 时间:
2014-06-21 12:49:50
阅读次数:
202
题目连接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=247&page=show_problem&problem=3666137646221225Digit CountingAccepte...
分类:
其他好文 时间:
2014-06-21 10:53:16
阅读次数:
365
len is a build-in function that returns the numbers of characters in a string: Since we started counting at zero, the last index should be 5...
分类:
其他好文 时间:
2014-06-21 08:17:22
阅读次数:
243
题目:Balanced Binary TreeGiven a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary ...
分类:
其他好文 时间:
2014-06-21 07:03:28
阅读次数:
249
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or...
分类:
其他好文 时间:
2014-06-21 06:58:22
阅读次数:
186