摘要: Determine whether an integer is a palindrome. Do this without extra space.这题又是Vaguely stated。点开Spoiler,问你负数如何处理?我哪知道你怎样才判对。去discuss看看,才发现负数一律不算palindr... 阅读全文
posted @ 2015-01-14 17:11 _Anonyme 阅读(125) 评论(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-01-14 16:56 _Anonyme 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321逆转一个整数。题目意思很简单,但是有许多需要注意的点。例如,溢出。题目在Spoiler里面说了溢出应该返回0。但是不看Spoi... 阅读全文
posted @ 2015-01-14 16:52 _Anonyme 阅读(107) 评论(0) 推荐(0) 编辑
摘要: The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font fo... 阅读全文
posted @ 2015-01-14 16:46 _Anonyme 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa... 阅读全文
posted @ 2015-01-14 16:36 _Anonyme 阅读(126) 评论(0) 推荐(0) 编辑
摘要: There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be ... 阅读全文
posted @ 2015-01-14 16:26 _Anonyme 阅读(88) 评论(0) 推荐(0) 编辑