摘要: Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.思路:注意,在for循环中条件有计算得到的负数时, ... 阅读全文
posted @ 2015-05-22 22:48 匡子语 阅读(138) 评论(0) 推荐(0)
摘要: Roman to IntegerGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.思路:首先要学一下罗马数字是怎么表示的,参见百度百科其实... 阅读全文
posted @ 2015-05-22 22:32 匡子语 阅读(291) 评论(0) 推荐(0)