码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
[LeetCode]Binary Tree Level Order Traversal
【题目】 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 / ...
分类:其他好文   时间:2014-12-08 10:44:51    阅读次数:161
IDL 日期时间函数整理
同Matlab一样,IDL同样包含了日期和时间函数,通过这些函数可以实现特定的需求。函数名称 功能描述BIN_DATE- Converts ASCII date/time string to binary string.-标准日期时间字符串转换成6元素...
分类:其他好文   时间:2014-12-08 10:42:05    阅读次数:543
linux根目录文件夹介绍
/binbin是binary的缩写。这个目录沿袭了UNIX系统的结构,存放着使用者最经常使用的命令。例如cp、ls、cat,等等。/boot这里存放的是启动Linux时使用的一些核心文件,如内核initrd,grub。/devdev是device。存放设备文件(外部设备)--黑底红字,如dvd、cdrom。1、块设备--随机访问..
分类:系统相关   时间:2014-12-08 07:05:45    阅读次数:254
剑指offer源码系列-树的子结构
输入两颗二叉树A,B,判断B是不是A的子结构。 #include #include using namespace std; struct BinaryTreeNode{ int value; BinaryTreeNode* left; BinaryTreeNode* right; }; //递归判断结点是否相等 bool doesTree1HasTree2(Binary...
分类:其他好文   时间:2014-12-07 21:43:46    阅读次数:143
[LeetCode]Binary Tree Postorder Traversal
【题目】 Given a binary tree, return the postorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 return [3,2,1]. Note: Recursi...
分类:其他好文   时间:2014-12-07 17:49:21    阅读次数:135
二分查找
二分查找算法,又称折半查找,是一种在有序数组中查找某一特定元素的搜索算法。搜素过程从数组的中间元素开始,1)如果中间元素正好是要查找的元素,则搜素过程结束;2)如果某一特定元素大于或者小于中间元素,则在数组大于或小于中间元素的那一半中查找;3)数组为空,退出代码如下: 1 int binary...
分类:其他好文   时间:2014-12-07 12:31:03    阅读次数:211
python 文件读写模式
'b' --> binary 二进制'r' --> read 读取'w' --> write 写'a' --> append 追加于是: 'rb'就是 以二进制的形式读取文件注:'w' 和 'a'的区别:'w'模式下, 如果文件不存在, 会创建这个文件; 如果文件存在, 则将其覆盖'a'模式下, 打...
分类:编程语言   时间:2014-12-07 01:19:51    阅读次数:167
【LeetCode】Maximal Rectangle
Maximal RectangleGiven a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.如果用DP来做,判断(begin...
分类:其他好文   时间:2014-12-06 16:44:58    阅读次数:166
【LeetCode】Scramble String
Scramble StringGiven a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible...
分类:其他好文   时间:2014-12-06 12:44:32    阅读次数:187
POJ 2499 Binary Tree 数学题解
本题名为二叉树,其实主要是考数学加速计算的方法。 本题思路最简单就是从目标节点往根节点查找,那么效率就等于树高了; 不过由于树高可能会极大,故此这样查找会超时。 那么就在查找根节点的时候,把题目的+-法变成除法查找,就可以极大加速查找了,由原来的超时变成0ms过了。...
分类:其他好文   时间:2014-12-06 11:27:27    阅读次数:211
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!