摘要: Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Update (2014-11-02): The s... 阅读全文
posted @ 2015-10-26 20:54 AprilCheny 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.解法:与罗马数字转整数过程相反。例如数字2438,罗马数字表示为MM CD XXX VI... 阅读全文
posted @ 2015-10-26 10:43 AprilCheny 阅读(237) 评论(0) 推荐(0) 编辑
摘要: Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.罗马数字基本字符共7个,即I(1)、V(5)、X(10)、L(50)、C(100)、D(... 阅读全文
posted @ 2015-10-26 09:44 AprilCheny 阅读(329) 评论(0) 推荐(0) 编辑