![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
文章平均质量分 61
TheShy:)
这个作者很懒,什么都没留下…
展开
-
leetcode剑指offer刷题记录
个人leetcode刷题记录原创 2022-11-15 14:51:10 · 95 阅读 · 0 评论 -
算法练习-leetcode-1.两数之和
题目leetcode-1.两数之和我的解题思路:排序后,折半查找时间复杂度: O(nlogn) (其实取决于排序算法的时间复杂度,这里默认快排,最小的时间复杂度)空间复杂度:O(n)解题代码:class Solution: def __init__(self): self.resl = 0 self.resr = 0 def twoSum(self, nums: List[int], target: int) -> List[int原创 2022-04-26 18:43:57 · 1181 阅读 · 0 评论