求二叉树的最大深度/** * Definition for binary tree * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ int m...
分类:
其他好文 时间:
2015-03-10 23:06:11
阅读次数:
160
/** * Definition for binary tree * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */bool isSameTree(...
分类:
其他好文 时间:
2015-03-10 22:44:42
阅读次数:
144
Question:Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to ro...
分类:
其他好文 时间:
2015-03-10 17:01:03
阅读次数:
129
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an...
分类:
其他好文 时间:
2015-03-10 16:57:12
阅读次数:
121
Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth...
分类:
其他好文 时间:
2015-03-10 15:16:50
阅读次数:
146
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:
其他好文 时间:
2015-03-10 13:51:19
阅读次数:
111
Reverse bits of a given 32 bits unsigned integer.
For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 001...
分类:
其他好文 时间:
2015-03-10 12:04:14
阅读次数:
101
做一个二进制数字加法器 按照正常思路进行加法即可,设定一个进位变量carry,然后进行模拟 class Solution {public: string addBinary(string longStr, string shortStr) { string res; if (longStr.size...
分类:
其他好文 时间:
2015-03-10 11:42:49
阅读次数:
136
IntroductionMany projects now are in need of management of multi-tree level data. There are some ways to do this, but in this article I will introduce...
分类:
数据库 时间:
2015-03-10 10:13:45
阅读次数:
446
Description给定一个范围[a,b] (0#includeusing namespace std;#define ll long longll n,m;int nn[65],mm[65];ll p[65];void inti(){ p[0]=1; for(int i=1;i<63...
分类:
其他好文 时间:
2015-03-09 23:53:46
阅读次数:
175