码迷,mamicode.com
首页 >  
搜索关键字:binary search    ( 21761个结果
leetcode -- Flatten Binary Tree to Linked List
算法:1. 对root的左子树做处理,让左子树的根节点作为,根节点的右子树,并让右子树作为左子树根节点的右子树的子树2. 递归遍历右子树public void flatten(TreeNode root) { if(root==null){ return; ...
分类:其他好文   时间:2014-05-26 23:39:49    阅读次数:253
2014北京邀请赛 Happy Reversal
H. Happy Reversal 64-bit integer IO format: %lld      Java class name: Main Elfness is studying in an operation "NOT". For a binary number A, if we do operation "NOT A", after that, all digit...
分类:移动开发   时间:2014-05-23 00:43:49    阅读次数:430
Oracle 常用系统函数
²  字符函数 1.    replace( 字符串1,字符串2,字符串3)    replace( char, search_string, replace_string)    功能:在“字符串1”中搜索“字符串2”,并将其替换为“字符串3”。 例如下面的命令是将所有员工名字中出现的”A”替换为”中国”。 SQL>selectreplace(ename, 'A', '中国') fro...
分类:数据库   时间:2014-05-22 22:35:22    阅读次数:450
python用正则表达式怎么查询unicode码字符
import re data = open('a.txt') fh = open('b.txt', 'w') """Search the string begining with '【'""" p = re.compile(r'\s*[\u3010]') for each_d in data:     if re.match('\s*3\d{4}', each_d):    ...
分类:编程语言   时间:2014-05-22 17:26:17    阅读次数:293
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 identical an...
分类:其他好文   时间:2014-05-22 16:46:03    阅读次数:173
Maximum Depth of Binary Tree
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-05-22 16:05:56    阅读次数:239
Oracle Case When的妙用
Case when 的用法--简单Case函数简单CASE表达式,使用表达式确定返回值.语法: CASE search_expression WHEN expression1 THEN result1 WHEN expression2 THEN result2 ... WHEN expre...
分类:数据库   时间:2014-05-22 14:56:26    阅读次数:336
iOS-CocoaPods的使用
一、安装1、打开终端sudo gem install cocoapods命令解释:用gem安装cocospods工具包2、pod setup命令解释:用gem安装cocospods工具包提示:安装了CocoaPods之后,今后在命令行中,直接使用pod即可二、查找第三方库1、pod search j...
分类:移动开发   时间:2014-05-22 14:24:10    阅读次数:431
计算机的存储单位
位 bit (比特)(Binary Digits):存放一位二进制数,即 0 或 1,最小的存储单位。字节 byte:8个二进制位为一个字节(B),最常用的单位。计算机存储单位一般用B,KB,MB,GB,TB,PB,EB,ZB,YB,BB来表示,它们之间的关系是:1KB (Kilobyte 千字节)...
分类:其他好文   时间:2014-05-22 00:58:58    阅读次数:209
【LeetCode】Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ...
分类:其他好文   时间:2014-05-21 19:11:16    阅读次数:266
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!