码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
[leetcode] Symmetric Tree
Symmetric Tree  Total Accepted: 43063 Total Submissions: 137255My Submissions Question  Solution  Given a binary tree, check whether it is a mirror of itself (ie, symmetric around it...
分类:其他好文   时间:2015-02-05 11:18:16    阅读次数:133
[leetcode] Same Tree
Same Tree  Total Accepted: 46766 Total Submissions: 111239My Submissions Question  Solution  Given two binary trees, write a function to check if they are equal or not. Two binary t...
分类:其他好文   时间:2015-02-05 11:17:33    阅读次数:103
67. Add Binary Leetcode Python
For example, a = "11" b = "1" Return "100". 这题的做法和前面一题plus one 一样,区别在于需要将两个string先相加,再判断是否要进位。 直接上代码吧。 class Solution: # @param a, a string # @param b, a string # @return a string ...
分类:编程语言   时间:2015-02-05 09:36:04    阅读次数:153
Lintcode: Binary Representation
Given a (decimal - e g 3.72) number that is passed in as a string,return the binary representation that is passed in as a string.If the number can no....
分类:其他好文   时间:2015-02-05 07:03:58    阅读次数:147
Lintcode: Binary Search
Binary search is a famous question in algorithm.For a given sorted array (ascending order) and a target number, find the first index of this number in...
分类:其他好文   时间:2015-02-05 07:02:22    阅读次数:91
[LeetCode] Sum Root to Leaf Numbers 求根到叶节点数字之和
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which...
分类:其他好文   时间:2015-02-05 00:39:43    阅读次数:144
读xml生成代码例子
读xml生成相应的  lua解析协议代码: #include #include "tinyxml2.h" #include #include using namespace tinyxml2; using namespace std; std::ofstream file("readProto.lua",std::ios::ate|std::ios::binary); void r...
分类:其他好文   时间:2015-02-04 23:27:37    阅读次数:168
UVa122:Trees on the level
Trees on the levelBackgroundTrees are fundamental in many branches of computer science. Current state-of-the art parallel computers such as Thinking M...
分类:其他好文   时间:2015-02-04 23:03:13    阅读次数:227
Sum Root to Leaf Numbers
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 which represents the number 123. Find the tota...
分类:其他好文   时间:2015-02-04 21:57:07    阅读次数:180
poj2255 Tree Recovery
Tree Recovery Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11955   Accepted: 7505 Description Little Valentine liked playing with binary trees very much...
分类:其他好文   时间:2015-02-04 21:55:50    阅读次数:248
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!