上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页
摘要: Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example: Given "25525511135", return ["2... 阅读全文
posted @ 2015-10-28 20:57 AprilCheny 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C prog... 阅读全文
posted @ 2015-10-28 10:30 AprilCheny 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑
摘要: Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ... 阅读全文
posted @ 2015-10-25 17:57 AprilCheny 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana... 阅读全文
posted @ 2015-10-25 09:57 AprilCheny 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 待补充。Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the lon... 阅读全文
posted @ 2015-10-24 18:20 AprilCheny 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe... 阅读全文
posted @ 2015-10-24 18:16 AprilCheny 阅读(178) 评论(0) 推荐(0) 编辑
摘要: The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw... 阅读全文
posted @ 2015-10-24 11:23 AprilCheny 阅读(386) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页