2015年11月19日

String to Integer (atoi)

摘要: 这题写的好惨啊,各种情况1、丢弃前面空白和数字后面东西2、数字是会连续输入的或者是和符号一起输出的,中间有其他的字符都会视为无效,数字前有其他字符也会视为无效。3、0777视为777的,注意整数溢出。 1 class Solution { 2 public: 3 int myAtoi(str... 阅读全文

posted @ 2015-11-19 15:37 RenewDo 阅读(127) 评论(0) 推荐(0) 编辑

导航