String
文章平均质量分 77
ljffdream
这个作者很懒,什么都没留下…
展开
-
【Leetcode】Reverse word in a string
【题目】Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click to show clarification.Clarification:What con原创 2014-11-27 23:28:33 · 545 阅读 · 0 评论 -
【Leetcode】Longest Palindrome Substring
【题目】Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.【题解】Mana转载 2014-11-29 11:25:48 · 402 阅读 · 0 评论 -
【Leetcode】Generate Parent
【题目】Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:"((()))", "(()())", "(())()", "()((转载 2015-01-12 14:22:55 · 321 阅读 · 0 评论 -
【Leetcode】integer to Roman
【题目】Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.【分析】只要是遵守那个转换规则就好吧。然后就是数学处理。【代码1】private static LinkedHashMap numToRoman原创 2014-12-24 18:58:12 · 248 阅读 · 0 评论 -
【Leetcode】Find peak numbers
【题目】A peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.The array may contain multipl原创 2015-04-08 10:35:46 · 348 阅读 · 0 评论 -
【Leetcode】Zigzag Conversion
【题目】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 for better legibility)P A H N转载 2015-07-26 13:36:05 · 310 阅读 · 0 评论 -
【Leetcode】String to Integer(ATOI)
【题目】Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possibl转载 2015-07-12 17:03:52 · 365 阅读 · 0 评论 -
【Leetcode】Compare version numbers
【题目】Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 version2 return -1, otherwise return 0.You may assume that the version strings are non-em转载 2015-07-04 20:45:25 · 286 阅读 · 0 评论 -
【Leetcode】Longest Palindrome
【题目】Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.【思路】中心检测转载 2015-09-09 10:25:31 · 358 阅读 · 0 评论