摘要: 题目:https://leetcode.com/problems/string-to-integer-atoi/ Implement atoi to convert a string to an integer. 思路: 把情况搞清楚就好了。 代码:C++: int myAtoi(string st 阅读全文
posted @ 2016-03-10 20:23 gavinXing 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 题目:https://leetcode.com/problems/reverse-integer/ Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 思路: 这道题不难 阅读全文
posted @ 2016-03-10 12:06 gavinXing 阅读(109) 评论(0) 推荐(0) 编辑
摘要: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font 阅读全文
posted @ 2016-03-10 12:01 gavinXing 阅读(133) 评论(0) 推荐(0) 编辑