
LeetCode
不会起昵称啊
这个作者很懒,什么都没留下…
展开
-
LeetCode in Python-1. 两数之和
题目描述解法1、切片后查找class Solution(object): def twoSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ fo...转载 2019-06-20 09:08:44 · 148 阅读 · 0 评论 -
LeetCode in Python-2. 两数相加
题目描述解法# Definition for singly-linked list.# class ListNode(object):# def __init__(self, x):# self.val = x# self.next = Noneclass Solution(object): def addTwoNumbe...转载 2019-06-20 22:27:48 · 117 阅读 · 0 评论 -
LeetCode in Python-3. 无重复字符的最长子串
题目描述解法class Solution(object): def lengthOfLongestSubstring(self, s): """ :type s: str :rtype: int """ start = -1 #长度= i - start max = 0 #子...转载 2019-06-21 09:36:14 · 95 阅读 · 0 评论