码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
Leetcode: Binary Tree Level Order Transversal
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,...
分类:其他好文   时间:2014-09-15 14:07:38    阅读次数:175
LeetCode——Binary Tree Maximum Path Sum
Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. For example: Given the below binary tree, 1 / 2 3 Return 6....
分类:其他好文   时间:2014-09-15 12:58:38    阅读次数:168
Add Binary
[leetcode]Add Binary...
分类:其他好文   时间:2014-09-15 11:23:28    阅读次数:190
Leetcode: Binary Tree Inorder Transversal
Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,3,2]....
分类:其他好文   时间:2014-09-15 09:54:08    阅读次数:135
boost序列化
#include #include #include #include #include #include #include #pragma warning (disable: 4244) //解决boost 中binary序列化:“std::streamsize”转换到“size_t”usi...
分类:其他好文   时间:2014-09-15 01:02:07    阅读次数:295
leetcode - Populating Next Right Pointers in Each Node I&II
Populating Next Right Pointers in Each Node IGiven a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; Tree...
分类:其他好文   时间:2014-09-14 22:04:27    阅读次数:241
Leetcode Construct Binary Tree from Preorder and Inorder Traversal
Construct Binary Tree from Preorder and Inorder Traversal 结题报告 从前序遍历和中序遍历的结果重建一颗二叉树。 解题思路,随便写一个二叉树,然后写出前序和中序遍历的结果会发现特点。 二叉树的首节点必然是前序遍历的第一个节点,以这个节点在中序遍历的结果中作为划分,这个节点左侧的是左子树的节点,右侧是右子树节点。 例如,一个二叉...
分类:其他好文   时间:2014-09-14 20:48:47    阅读次数:176
ACM竞赛常用STL(二)之STL--algorithm
无疑是STL 中最大的一个头文件,它是由一大堆模板函数组成的。下面列举出中的模板函数:adjacent_find / binary_search / copy / copy_backward / count/ count_if / equal / equal_range / fill / fill_...
分类:其他好文   时间:2014-09-14 20:43:37    阅读次数:280
每日算法之四十六:Add Binary(二进制字符创相加)
二进制字符创相加,通过进位的方式逐位考虑。也可以把相加的过程抽象成一个函数。 Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". 方法一: class Solution { public: s...
分类:其他好文   时间:2014-09-14 15:26:07    阅读次数:285
【leetcode】Gray Code
题目: 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...
分类:其他好文   时间:2014-09-14 11:22:47    阅读次数:181
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!