码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果
递归中对于参数和变量的理解
对于递归函数:参数,局部变量的生存期和调用时间问题 ================================================================================================== #include int binary_to_ascii( unsigned int value) { unsigned in...
分类:其他好文   时间:2014-06-04 23:33:41    阅读次数:351
nginx平滑升级
转载请注明转自:  存储系统研究, 本文固定链接: nginx平滑升级 1. nginx平滑升级 当我们开发了一个新的nginx模块,需要升级nginx binary时,需要进行以下的步骤: a)         替换老的nginx binary [root@lg-miui-file-mfs09 sbin]# mv nginx nginx.old [root@lg-miui-file-mfs09...
分类:其他好文   时间:2014-06-03 04:57:12    阅读次数:269
leetcode -day23 Construct Binary Tree from Inorder and Postorder Traversal & Construct Binary Tree f
1、 ?? Construct Binary Tree from Inorder and Postorder Traversal Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in...
分类:其他好文   时间:2014-06-03 03:13:59    阅读次数:195
leetcode -day24 Maximum Depth of Binary Tree & Binary Tree Zigzag Level Order Traversal
1、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 leaf node. clas...
分类:其他好文   时间:2014-06-02 23:13:22    阅读次数:290
LeetCode: Maximal Rectangle [085]
【题目】 Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area. 【题意】 给定一个由0和1填充的二维矩阵,找一个全是1的最大矩形 【思路】 扫描二维矩阵,凡是扫到值为1的块时候,以当前块为矩形的左上角区块拓展,找最大矩阵。 先找出以每个“1”区块为左上角区块的最大矩形,然后求出最大全局的最大矩...
分类:其他好文   时间:2014-06-02 23:08:07    阅读次数:289
红黑树
介绍还有一种平衡二叉树:红黑树(Red Black Tree),红黑树由Rudolf Bayer于1972年发明,当时被称为平衡二叉B树(symmetric binary B-trees),1978年被Leonidas J. Guibas和Robert Sedgewick改成一个比較摩登的名字:红黑...
分类:其他好文   时间:2014-06-02 20:05:23    阅读次数:375
LeetCode: Unique Binary Search Trees [095]
【题目】 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. 1 3 3 2 1 \ / / / \ 3 2 1 ...
分类:其他好文   时间:2014-06-01 15:34:24    阅读次数:231
LeetCode: Unique Binary Search Trees II [096]
【题目】 Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example, Given n = 3, your program should return all 5 unique BST's shown below. 1 3 3 2 1 \ / / / \ ...
分类:其他好文   时间:2014-06-01 15:33:45    阅读次数:297
LeetCode: Scramble String [87]
【题目】 Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible representation of s1 = "great": great / gr eat / \ / g r e at / ...
分类:其他好文   时间:2014-06-01 09:41:05    阅读次数:196
LeetCode: Gray Code [089]
【题目】 The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the sequence of gray code. A gray code sequence must begin with 0. ...
分类:其他好文   时间:2014-06-01 09:16:29    阅读次数:242
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!