摘要:
题目:Given a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After... 阅读全文
posted @ 2015-08-24 21:09
__Neo
阅读(129)
评论(0)
推荐(0)
摘要:
题目:Write a function to find the longest common prefix string amongst an array of strings.代码:class Solution {public: string longestCommonPrefix(vect... 阅读全文
posted @ 2015-08-24 19:23
__Neo
阅读(123)
评论(0)
推荐(0)
摘要:
题目:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.提示:此题只要熟悉罗马数字的书写语法,做起来就不会太难,关于罗马数字的介绍可以参考... 阅读全文
posted @ 2015-08-24 16:43
__Neo
阅读(139)
评论(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... 阅读全文
posted @ 2015-08-24 16:04
__Neo
阅读(135)
评论(0)
推荐(0)
摘要:
题目:Determine whether an integer is a palindrome. Do this without extra space.提示:此题需要注意负数不是回文数。另外,我一开始的思路是把输入数字通过整除和取模运算把它倒转过来与原数字进行比较(不用考虑倒转过来的数字会不会溢出... 阅读全文
posted @ 2015-08-24 13:48
__Neo
阅读(181)
评论(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 a... 阅读全文
posted @ 2015-08-24 11:06
__Neo
阅读(165)
评论(0)
推荐(0)
摘要:
题目:Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Have you thought about this?Here are some good questions to ... 阅读全文
posted @ 2015-08-24 10:13
__Neo
阅读(156)
评论(0)
推荐(0)


浙公网安备 33010602011771号