Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:
其他好文 时间:
2015-03-08 10:26:05
阅读次数:
1355
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:
其他好文 时间:
2015-03-07 21:18:26
阅读次数:
121
Symmetric Tree问题:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).思路: dfs我的代码:public class Solution { ...
分类:
其他好文 时间:
2015-03-07 19:58:45
阅读次数:
135
An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the...
分类:
其他好文 时间:
2015-03-07 18:37:15
阅读次数:
367
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".[Solution] 1 string addBinary(string a, string ...
分类:
其他好文 时间:
2015-03-07 18:36:26
阅读次数:
107
第一步:下载和配置Maven下载地址:http://maven.apache.org/download.cgi下载第二项(binary zip)后解压,如图。第二步:添加环境变量MAVEN_HOME:D:\apache-maven-3.0.2 (根据自己的目录进行修改)Path:%MAVEN_HOM...
分类:
系统相关 时间:
2015-03-07 18:30:45
阅读次数:
227
Description
给定一个范围[a,b] (0
Input
输入数据有多组,每组数据输入两个整数a,b,表示区间[a, b]。
Output
输出该区间内二进制的1最多的整数,如果有多个数二进制1的个数相同,输出最小的那个数。
Sample Input
4 87 14
Sample Output
77
HINT
思路:
区间...
分类:
其他好文 时间:
2015-03-07 17:15:10
阅读次数:
177
Balanced Binary Tree问题:Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary ...
分类:
其他好文 时间:
2015-03-07 15:40:43
阅读次数:
108
欢迎大家阅读参考,如有错误或疑问请留言纠正,谢谢
Path Sum II
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.
For example:
Given the below binary tree and sum =...
分类:
其他好文 时间:
2015-03-07 14:15:19
阅读次数:
123
欢迎大家阅读参考,如有错误或疑问请留言纠正,谢谢
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...
分类:
其他好文 时间:
2015-03-07 14:15:09
阅读次数:
118