Apparently BFS is the most obvious one.. but it is not that simple - only constant extra space is provided.Then the only strategy to take is recursion...
分类:
其他好文 时间:
2014-07-22 00:39:35
阅读次数:
258
The trick is, we can work on a reversed vector - learnt from EPI.class Solution {public: vector plusOne(vector &digits) { std::reverse(digit...
分类:
其他好文 时间:
2014-07-22 00:33:36
阅读次数:
223
Android的生命周期以及横竖屏切换生命周期在Nexus 5上面的亲测结果
分类:
移动开发 时间:
2014-07-21 10:05:35
阅读次数:
341
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at...
分类:
其他好文 时间:
2014-07-21 10:00:12
阅读次数:
185
多对一(many to one)单向many-to-one关联是最常见的单向关联关系。 create table Person ( personId bigint not null primary key, addressId ...
分类:
系统相关 时间:
2014-07-21 09:35:39
阅读次数:
214
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at...
分类:
其他好文 时间:
2014-07-21 09:14:10
阅读次数:
168
1 live in 居住 2 dish 盘,菜肴 e.g. Surprise a new neighbour with one of your favourite home-made dishes! 3 put away 收好,储存 e.g. Her bed was crisply made收拾的很...
分类:
其他好文 时间:
2014-07-21 08:11:02
阅读次数:
222
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity...
分类:
其他好文 时间:
2014-07-21 00:39:31
阅读次数:
249
Problem Description
Whuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. One day Hibix opened purse and found there were some coins. He decided to buy a very nice watch in...
分类:
其他好文 时间:
2014-07-20 23:01:28
阅读次数:
271
//一般的字符串的解析 NSString *string = @"One,Two,Three,Four"; NSLog(@"string:%@",string); NSArray *array = [string componentsSeparatedByString:@","]; NSLo...
分类:
其他好文 时间:
2014-07-20 21:35:54
阅读次数:
200