随笔分类 -  LeetCode

摘要:实现atoi这个函数,public int atoi(String str),传入字符串str可以返回整数,请仔细考虑一下字符串的各种情况!String to Integer: Case分析正常数字Sample:”123”,”0”,”1” ,"-1"普通特殊字符:Sample: "000","001... 阅读全文
posted @ 2015-12-07 16:14 Binyao 阅读(308) 评论(0) 推荐(0)
摘要:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321Discuss: 1.If the integer's last digit is 0, what should the ... 阅读全文
posted @ 2015-11-24 21:38 Binyao 阅读(176) 评论(0) 推荐(0)
摘要:1Two Sum25arraysortsetTwo Pointers2Add Two Numbers34linked listTwo PointersMath3Longest Substring Without Repeating Characters32stringTwo Pointershash... 阅读全文
posted @ 2015-10-29 22:29 Binyao 阅读(446) 评论(0) 推荐(0)