Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo...
分类:
其他好文 时间:
2014-10-28 07:02:27
阅读次数:
171
这道题在LeetCode OJ上难道属于Easy,但是通过率却比较低,究其原因是需要考虑的情况比较低,很少有人一遍过吧。
【题目】
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge,...
分类:
编程语言 时间:
2014-10-27 17:47:03
阅读次数:
276
Question:Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see b...
分类:
其他好文 时间:
2014-10-27 12:25:57
阅读次数:
121
问题描述:
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree...
分类:
其他好文 时间:
2014-10-26 13:11:29
阅读次数:
177
原创文章,如有转载,请注明出处:http://blog.csdn.net/yihui823/article/details/6697535本文章的前提:已经安装了Eclipse和ADT。android SDK也下载完毕。Eclipse里面已经设置好了android SDK。本文章将系统的介绍Andr...
分类:
移动开发 时间:
2014-10-25 07:03:41
阅读次数:
182
String to Integer (atoi)
Total Accepted:
20984 Total Submissions:
145855
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a...
分类:
其他好文 时间:
2014-10-24 22:19:11
阅读次数:
199
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:
其他好文 时间:
2014-10-24 18:07:56
阅读次数:
170
1 package com.sixin.view; 2 3 import android.content.Context; 4 import android.graphics.Canvas; 5 import android.graphics.Color; 6 import andr...
分类:
其他好文 时间:
2014-10-24 14:13:19
阅读次数:
245
7001. Visible Lattice Points
Problem code: VLATTICE
Consider a N*N*N lattice. One corner is at (0,0,0) and the opposite one is at (N,N,N). How many lattice points are visible from co...
分类:
其他好文 时间:
2014-10-24 11:05:49
阅读次数:
294
def add(a, b):print "ADDING %d + %d" % (a, b)return a + bdef subtract(a, b):print "SUBTRACTING %d - %d" % (a, b) return a - bdef multiply(a, b): ...
分类:
其他好文 时间:
2014-10-24 10:47:09
阅读次数:
243