摘要:
问题 Implement atoi to convert a string to an integer. 将一个字符串转化为整数 问题看似简单,实际上有许多需要注意的细节。 要点: 对特殊字符进行处理:空格字符,放在前面的0字符只有在数字0-9内的字符才能转化为整数,否则全部返回0正负号的问题:默认 阅读全文
摘要:
原题: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Note: The input is assumed to be a 32-bit signed integ 阅读全文
摘要:
原题: 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 f 阅读全文