本文介绍的STL算法中的find、search查找算法。在STL源码中有关算法的函数大部分在本文介绍,包含findand find_if、adjacent_find、search、search_n、lower_bound、 upper_bound、 equal_range、binary_search、find_first_of、find_end相关算法,下面对这些算法的源码进行了详细的剖析,并且适当给出应用例子,增加我们对其理解,方便我们使用这些算法。...
分类:
其他好文 时间:
2014-09-30 21:19:50
阅读次数:
280
21、Android 4.0 源代码结构?? Android源码的第一级目录结构 Android/abi (abi相关代码。ABI:application binary interface,应用程序二进制接口) Android/bionic(bionic C库) Android/bootable(启动引导相...
分类:
移动开发 时间:
2014-09-30 13:31:00
阅读次数:
374
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".算法:模拟加法过程 1 class Solution { 2 public: 3 st...
分类:
其他好文 时间:
2014-09-30 11:05:31
阅读次数:
155
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-09-30 02:51:41
阅读次数:
394
RPM是RedHat Package Manager(RedHat软件包管理工具)类似Windows里面的“添加/删除程序”rpm 执行安装包二进制包(Binary)以及源代码包(Source)两种。二进制包可以直接安装在计算机中,而源代码包将会由RPM自动编译、安装。源代码包经常以src.rpm作...
分类:
其他好文 时间:
2014-09-30 00:54:21
阅读次数:
529
Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.题意:知道二叉树的前序遍历和中...
分类:
其他好文 时间:
2014-09-29 23:47:51
阅读次数:
265
介绍还有一种平衡二叉树:红黑树(Red Black Tree),红黑树由Rudolf Bayer于1972年发明,当时被称为平衡二叉B树(symmetric binary B-trees),1978年被Leonidas J. Guibas和Robert Sedgewick改成一个比較摩登的名字:红黑...
分类:
其他好文 时间:
2014-09-29 22:19:41
阅读次数:
484
Mysql学习之--卸载源码mysql-5.6安装mysql-5.5系统环境:操作系统:RedHatEL6DBSoft:Mysql5.5.12Mysql在linux下的安装方式有两种版本,一种为Binary(二进制),另外一种为Source(源码包),本文为SourceInstall方式。由于,本机已经安装了mysql-5.6的版本,前面的版本采用源..
分类:
数据库 时间:
2014-09-29 21:23:42
阅读次数:
361
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
For example:
Given binary tree {3,9,20,#,#,15,7},
3
/ 9 20
...
分类:
其他好文 时间:
2014-09-29 19:55:01
阅读次数:
169
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 unique BST's.
去网上搜n个二叉搜索树的递推公式或者Catalan数,可以由h(n)=C(2n,n)/(n+1)得到h(n)=[2n*(2n-1)*...(n+2)]/[n!]....
分类:
其他好文 时间:
2014-09-29 17:57:01
阅读次数:
171