码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
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
Flatten Binary Tree to Linked List <leetcode>
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t...
分类:其他好文   时间:2014-09-13 22:39:06    阅读次数:238
Eclipse:初次设置C/++遇到Binary Not Found的问题。
刚开始设置Eclipse+Cygwin在Windows下编写LinuxC程序代码,会遇到如下图的问题:解决的办法是:在执行Launcher的时候,先执行Ctrl + b,然后再执行Launcher。
分类:系统相关   时间:2014-09-13 21:26:25    阅读次数:242
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!