leetcode
文章平均质量分 61
__Ritchie__
这个作者很懒,什么都没留下…
展开
-
Two Sum & Add Two Numbers
Two Sum 题目:https://leetcode.com/problems/two-sum/ class Solution(object): def twoSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List原创 2015-12-09 16:40:00 · 230 阅读 · 0 评论 -
Longest Substring Without Repeating Characters
题目:https://leetcode.com/problems/longest-substring-without-repeating-characters/ 算法思路: 定义positions字典,记录当前访问位置之前出现的字符的位置 定义start变量,标识不重复子串的开始位置 定义max遍历,记录最大不重复子串的长度 对输入的字符串,从开头到结尾进行一次遍历原创 2015-12-10 10:39:01 · 212 阅读 · 0 评论 -
Median of Two Sorted Arrays
题目:https://leetcode.com/problems/median-of-two-sorted-arrays/原创 2015-12-11 13:03:57 · 394 阅读 · 0 评论 -
Longest Palindromic Substring
题目:https://leetcode.com/problems/longest-palindromic-substring/ 算法分析 代码实现 动态规划: class Solution(object): def longestPalindrome(self, s1): """ :type s: str :rty原创 2015-12-13 18:20:24 · 235 阅读 · 0 评论