摘要: Given a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?判断一个链表是否为回文链表,有很多方法都可以进行判断,可以先遍历链表然后... 阅读全文
posted @ 2015-10-08 20:48 eversliver 阅读(296) 评论(0) 推荐(0) 编辑
摘要: Valid Palindrome Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a p 阅读全文
posted @ 2015-10-08 19:52 eversliver 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 给定一个整数,将他转换到罗马字符。同样这里的罗马字符不会超过1000(M),PS:关 阅读全文
posted @ 2015-10-08 16:14 eversliver 阅读(280) 评论(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)、... 阅读全文
posted @ 2015-10-08 13:40 eversliver 阅读(275) 评论(0) 推荐(0) 编辑