摘要: Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.Solution:此题是要求把罗马数字转换成数字。首先,学习一下罗马数字,参考罗马数字罗... 阅读全文
posted @ 2014-10-19 12:34 Phoebe815 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or... 阅读全文
posted @ 2014-10-19 06:22 Phoebe815 阅读(115) 评论(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 @ 2014-10-19 06:16 Phoebe815 阅读(131) 评论(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 @ 2014-10-19 05:45 Phoebe815 阅读(162) 评论(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 @ 2014-10-19 03:46 Phoebe815 阅读(115) 评论(0) 推荐(0) 编辑