2015年5月11日

摘要: 题目: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 ... 阅读全文
posted @ 2015-05-11 23:07 承续缘 阅读(249) 评论(0) 推荐(0)
摘要: 题目:Given an absolute path for a file (Unix-style), simplify it.For example,path="/home/", =>"/home"path="/a/./b/../../c/", =>"/c"click to show corner ... 阅读全文
posted @ 2015-05-11 21:38 承续缘 阅读(162) 评论(0) 推荐(0)
摘要: 题目:Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.代码:class Solution {public: vect... 阅读全文
posted @ 2015-05-11 19:47 承续缘 阅读(185) 评论(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... 阅读全文
posted @ 2015-05-11 19:00 承续缘 阅读(213) 评论(0) 推荐(0)
摘要: 题目:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.代码:class Solution {public: int romanTo... 阅读全文
posted @ 2015-05-11 16:02 承续缘 阅读(148) 评论(0) 推荐(0)
摘要: 题目:Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.代码:class Solution {public: string intT... 阅读全文
posted @ 2015-05-11 15:26 承续缘 阅读(184) 评论(0) 推荐(0)
摘要: 题目:Validate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the problem s... 阅读全文
posted @ 2015-05-11 11:48 承续缘 阅读(251) 评论(0) 推荐(0)

导航