摘要:
这道题做的不够顺利,许多次通过,但是居然是卡在一个小问题上了,判断strs是否为空,我想当然地就写成了if(strs == null) return null; 报错 java中null表示还没new出对象,就是还没开辟空间;“”表示new出了对象,但是这个对象装的是空字符串。这里显然是要应对str 阅读全文
posted @ 2014-05-08 11:56
neverlandly
阅读(318)
评论(0)
推荐(0)
摘要:
从右向左,preVal, curVal 1. curVal >= preVal: res+=curVal 2. curVal < preVal: res -= curVal 阅读全文
posted @ 2014-05-08 05:23
neverlandly
阅读(308)
评论(0)
推荐(0)
摘要:
Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below a... 阅读全文
posted @ 2014-05-08 03:27
neverlandly
阅读(388)
评论(0)
推荐(0)
浙公网安备 33010602011771号