LeetCode
AbyssssssssssS
这个作者很懒,什么都没留下…
展开
-
Leetcode-3无重复字符的最长子串
python3超时了,就是很传统的那种思路:每一种子串都检查一遍时间复杂度极高## @lc app=leetcode.cn id=3 lang=python3## [3] 无重复字符的最长子串## @lc code=startclass Solution: def lengthOfLongestSubstring(self, s: str) -> int:...原创 2019-11-26 16:33:28 · 156 阅读 · 0 评论 -
LeetCode-2.两数相加
python3算法思路参考: 画解算法-两数相加## @lc app=leetcode.cn id=2 lang=python3## [2] 两数相加## @lc code=start# Definition for singly-linked list.# class ListNode:# def __init__(self, x):# se...原创 2019-11-25 20:00:52 · 102 阅读 · 0 评论 -
LeetCode-1.两数之和
python3实现## @lc app=leetcode.cn id=1 lang=python3## [1] 两数之和## @lc code=startclass Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: for i in range(len(n...原创 2019-11-25 16:21:55 · 105 阅读 · 0 评论