摘要:
1 题目:Write a function to find the longest common prefix string amongst an array of strings.Hide TagsString2 思路所有字符串公共的前缀,那么第一个字符串肯定包括了。 从第一个字符串开始遍历着手即... 阅读全文
2015年6月14日
2015年6月10日
摘要:
1 题目:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.2 思路和上一道反过来,好吧,但是思路不一样。我写的代码思路一样,要考虑一些特... 阅读全文
摘要:
1 题目:Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.Hide TagsMathString2 思路:经过我仔细研读维基百科的说明h... 阅读全文
摘要:
1 题目:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoint... 阅读全文
摘要:
1 题目:Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more of the preceding elemen... 阅读全文
2015年6月7日
摘要:
1 题目:Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindrome... 阅读全文
2015年6月6日
摘要:
1 题目:Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below... 阅读全文
2015年6月5日
摘要:
1 题目: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 fo... 阅读全文
摘要:
1 题目:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longe... 阅读全文
2015年5月20日
摘要:
1 题目Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red... 阅读全文