
LeetCode
文章平均质量分 74
Jillian_sea
这个作者很懒,什么都没留下…
展开
-
[LeetCode] 最长回文子串[Python]
题目描述:给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为1000。一开始写了暴力搜索法,结果超时了,就上网找了答案,发现一个博客写的很好,推荐https://segmentfault.com/a/1190000003914228class Solution(object): def longestPalindrome(self, s): """...原创 2018-05-11 16:16:41 · 933 阅读 · 0 评论 -
[Leedcode]Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X 10L 50C 100D ...原创 2018-10-12 14:34:06 · 231 阅读 · 0 评论 -
【LeetCode】Longest Common Prefix [Python]
Write a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string "".Example 1:Input: ["flower","flow","flight"]Output:...原创 2018-10-12 15:13:22 · 333 阅读 · 0 评论 -
[LeedCode]Valid Parentheses [Python]
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.An input string is valid if:Open brackets must be closed by the same type of b...原创 2018-10-12 16:22:40 · 303 阅读 · 0 评论 -
Leetcode[1]Two Sum Python
Two Sum Go to DiscussGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and...原创 2018-10-08 18:43:28 · 214 阅读 · 0 评论