Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:
其他好文 时间:
2015-04-13 18:14:54
阅读次数:
111
转:http://blog.csdn.net/huangxiaohu_coder/article/details/8497286在原生Android下编译APK,编译没有问题,但是在运行的时候经常出现如标题所描述的异常,然后整个程序Crash掉...... 我遇到该问题常常都是因为修改了资源文件所引...
分类:
移动开发 时间:
2015-04-13 15:53:40
阅读次数:
117
I saw a lot of BFS based solutions. And my alternative solution is this mirror-ed BST iterator one, with some book-keeping:class Solution {public: ...
分类:
其他好文 时间:
2015-04-13 12:22:37
阅读次数:
136
The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the sequence of ...
分类:
其他好文 时间:
2015-04-13 09:30:41
阅读次数:
102
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".博主对于自己那冗长的代码真是累感不爱了~连注释都不用标了,特别清晰明了,捂脸逃走~只能安慰自己...
分类:
其他好文 时间:
2015-04-13 06:51:00
阅读次数:
107
https://leetcode.com/problems/reverse-bits/
Reverse bits of a given 32 bits unsigned integer.
For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), ret...
分类:
其他好文 时间:
2015-04-13 00:26:40
阅读次数:
143
Description:Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurall....
分类:
其他好文 时间:
2015-04-13 00:17:28
阅读次数:
130
题目Write a function that takes an unsigned integer and returns the number of ’1’ bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11’ has binary representation 00000000000...
分类:
其他好文 时间:
2015-04-12 21:12:01
阅读次数:
130
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t...
分类:
其他好文 时间:
2015-04-12 20:56:55
阅读次数:
122