- 博客(3)
- 收藏
- 关注
原创 8. String to Integer (atoi)--2016/10/10
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 and ask yourself what are the possible input cases.N
2016-10-11 00:16:25 172
原创 7. Reverse Integer--2016/10/10
Reverse digits of an integer.Example1: x = 123, return 321 Example2: x = -123, return -321思路:先判断正负,转换为正后依次取末位求结果class Solution {public: int reverse(int x) { bool isPositive = true;
2016-10-10 23:15:46 185
原创 6. ZigZag Conversion--2016/10/10
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 for better legibility)P A H N A P L S I I G
2016-10-10 23:09:15 172
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人