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-t...
分类:
其他好文 时间:
2014-12-18 22:11:40
阅读次数:
206
题目Reverse Integer通过率34.2%难度EasyReverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you ...
分类:
其他好文 时间:
2014-12-18 13:30:17
阅读次数:
134
问题描述:
Given a string containing only digits, restore it by returning all possible valid IP address combinations.
For example:
Given "25525511135",
return ["255.255.11.135", "255.255.111.35"]. (O...
分类:
其他好文 时间:
2014-12-16 17:04:09
阅读次数:
152
Sum Root to Leaf NumbersGiven a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-l...
分类:
其他好文 时间:
2014-12-16 16:55:37
阅读次数:
225
1 #include 2 using namespace std; 3 int m,s; 4 int main() 5 { 6 scanf("%d%d",&m,&s); 7 if (s==0 && m==1) printf("0 0\n"); 8 else if (s==0...
分类:
其他好文 时间:
2014-12-15 11:47:31
阅读次数:
125
问题描述:
A message containing letters from A-Z is being encoded to numbers using the following mapping:
'A' -> 1
'B' -> 2
...
'Z' -> 26
Given an encoded message containing digits, determine the tot...
分类:
其他好文 时间:
2014-12-15 10:30:25
阅读次数:
196
Reverse IntegerReverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.SOLUTION 1:注意越界后返回0.先用l...
分类:
其他好文 时间:
2014-12-14 09:24:32
阅读次数:
120
终于完成了LeetCode 上AC率在30%以上的题目,这道题是最后一道,纪念一下。
原题是这个样子的:
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...
分类:
其他好文 时间:
2014-12-14 00:49:21
阅读次数:
157
题目1036:Old Bill
时间限制:1 秒
内存限制:32 兆
特殊判题:否
提交:2302
解决:1211
题目描述:
Among grandfather's papers a bill was found.
72 turkeys $_679_
The first and the last digits ...
分类:
其他好文 时间:
2014-12-13 15:10:39
阅读次数:
135
标题:Reverse Integer正确率:34.8%难度简单Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Have you thought about this?Here...
分类:
其他好文 时间:
2014-12-12 23:33:08
阅读次数:
214