上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 40 下一页
摘要: Given an absolute path for a file (Unix-style), simplify it. For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c" click to show co 阅读全文
posted @ 2016-09-29 11:08 amazingzoe 阅读(112) 评论(0) 推荐(0)
摘要: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. Runtime: 59ms Runtime: 92ms 阅读全文
posted @ 2016-09-29 05:41 amazingzoe 阅读(94) 评论(0) 推荐(0)
摘要: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below 阅读全文
posted @ 2016-09-29 04:05 amazingzoe 阅读(135) 评论(0) 推荐(0)
摘要: Given a string, we can "shift" each of its letter to its successive letter, for example: "abc" -> "bcd". We can keep "shifting" which forms the sequen 阅读全文
posted @ 2016-09-28 02:45 amazingzoe 阅读(614) 评论(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 pr 阅读全文
posted @ 2016-09-24 05:29 amazingzoe 阅读(125) 评论(0) 推荐(0)
摘要: Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. Not 阅读全文
posted @ 2016-09-22 11:39 amazingzoe 阅读(93) 评论(0) 推荐(0)
摘要: Given an input string, reverse the string word by word. A word is defined as a sequence of non-space characters. The input string does not contain lea 阅读全文
posted @ 2016-09-22 11:33 amazingzoe 阅读(117) 评论(0) 推荐(0)
摘要: An abbreviation of a word follows the form <first letter><number><last letter>. Below are some examples of word abbreviations: a) it --> it (no abbrev 阅读全文
posted @ 2016-09-22 06:06 amazingzoe 阅读(210) 评论(0) 推荐(0)
摘要: Given a string, determine if a permutation of the string could form a palindrome. For example,"code" -> False, "aab" -> True, "carerac" -> True. Analy 阅读全文
posted @ 2016-09-20 11:31 amazingzoe 阅读(169) 评论(0) 推荐(0)
摘要: Given a string S, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can f 阅读全文
posted @ 2016-09-20 06:26 amazingzoe 阅读(152) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 40 下一页