Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".Analyse: Using XOR(^) to compute the result of ...
分类:
其他好文 时间:
2015-04-18 11:25:04
阅读次数:
105
Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note...
分类:
其他好文 时间:
2015-04-18 07:35:36
阅读次数:
135
Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1].No...
分类:
其他好文 时间:
2015-04-18 07:33:53
阅读次数:
118
Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].先pu...
分类:
其他好文 时间:
2015-04-18 07:32:59
阅读次数:
123
跟另一道题一样,不多说了public class Solution { public TreeNode buildTree(int[] inorder, int[] postorder) { // post就是pre的近似倒过来 if(inorder==null||...
分类:
其他好文 时间:
2015-04-18 06:26:50
阅读次数:
175
refhttp://www.cnblogs.com/springfor/p/3884034.html以下解释摘抄自 爱做饭的小莹子“题目:Given preorder and inorder traversal of a tree, construct the binary tree.Note:Yo...
分类:
其他好文 时间:
2015-04-18 06:23:56
阅读次数:
119
/binbin是binary的缩写。这个目录沿袭了UNIX系统的结构,存放着使用者最经常使用的命令。例如cp、ls、cat,等等。/boot这里存放的是启动Linux时使用的一些核心文件。/devdev是device(设备)的缩写。这个目录下是所有Linux的外部设备,其功能类似DOS下的.sys和...
分类:
系统相关 时间:
2015-04-18 01:12:38
阅读次数:
161
Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].二叉树...
分类:
其他好文 时间:
2015-04-17 22:06:08
阅读次数:
106
Binary Tree Zigzag Level Order TraversalTotal Accepted:31183Total Submissions:117840My SubmissionsQuestionSolutionGiven a binary tree, return thezigza...
分类:
其他好文 时间:
2015-04-17 21:53:46
阅读次数:
123
#include#include#includeusing namespace std;// Definition for binary tree struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int...
分类:
其他好文 时间:
2015-04-17 21:51:07
阅读次数:
141