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
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
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
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
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
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生成相应的 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
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
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
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