码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
[LeetCode]Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".题解:二进制字符串相加public String addBinary(String a, St...
分类:其他好文   时间:2015-09-23 23:13:29    阅读次数:169
LeetCode -- Same Tree
Question: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 ide...
分类:其他好文   时间:2015-09-23 20:51:08    阅读次数:154
STL 源代码分析 算法 stl_algo.h -- binary_search
本文为senlie原创。转载请保留此地址:http://blog.csdn.net/zhengsenliebinary_search------------------------------------------------------------------------------------...
分类:编程语言   时间:2015-09-23 19:16:21    阅读次数:154
binary search
二分法查找,前提是已经有序 1 int binary_search(int* a, int len, int goal) 2 { 3 int low = 0; 4 int high = len - 1; 5 while(low goal)12 hig...
分类:其他好文   时间:2015-09-23 19:14:46    阅读次数:152
RPM 命令使用总结
RPM即RedHatPackageManager(RedHat软件包管理工具);类似Windows里面的“添加/删除程序”rpm执行安装包二进制包(Binary)以及源代码包(Source)两种。二进制包可以直接安装在计算机中,而源代码包将会由RPM自动编译、安装。源代码包经常以src.rpm作为后缀名。常用命令组合..
分类:其他好文   时间:2015-09-23 17:19:48    阅读次数:211
面试题24:二叉排序树的后序遍历序列
题目描述输入一个整数数组,判断该数组是不是某二叉排序树的后序遍历的结果。如果是则返回true,否则返回false。假设输入的数组的任意两个数字都互不相同。题目分析剑指Offer(纪念版)P140代码实现// BST:Binary Search Tree,二叉搜索树bool VerifySquence...
分类:编程语言   时间:2015-09-23 17:03:08    阅读次数:147
poj1785 Binary Search Heap Construction
此题可以先排序再用rmq递归解决。当然可以用treap。http://poj.org/problem?id=1785 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxn = 5e4 + 10; 6 s...
分类:其他好文   时间:2015-09-23 17:02:09    阅读次数:172
MySQL字符编码
数据表tb的col列编码为latin1。而实际存储的字符是gbk编码时,用下面的语句可以查看到非乱码的原始字符串。select convert( binary(col) using gbk) from tb;
分类:数据库   时间:2015-09-23 16:27:23    阅读次数:163
*Unique Binary Search Tree
题目:Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. ...
分类:其他好文   时间:2015-09-23 13:21:21    阅读次数:220
[LeetCode]Path Sum
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo...
分类:其他好文   时间:2015-09-23 10:16:46    阅读次数:123
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!