![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
文章平均质量分 54
瞳恩Dawn
记录贴记录贴
展开
-
leetcode-22题-动态规划的括号生成
leetcode 22题的动态规划方程式原创 2022-07-08 14:43:00 · 133 阅读 · 0 评论 -
面试中会出现的典型链表类考题
在B站写左神的链表代码,记录贴原创 2022-06-27 20:13:48 · 96 阅读 · 0 评论 -
移除链表元素_设计链表
203:移除链表元素 Given the head of a linked list and an integer val remove all the nodes of the linked list that has Node.val == val, and return the new head. class ListNode: def __init__(self, val=0, next=None): self.val = val self.next =原创 2022-05-16 16:52:58 · 71 阅读 · 0 评论 -
有序数组平方和_长度最小的子数组_旋转矩阵II
977.有序数组的平方 Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order. Input: nums = [-4,-1,0,3,10] Output: [0,1,9,16,100] Explanation: After squaring, the array becomes [16,1,原创 2022-05-14 17:34:35 · 66 阅读 · 0 评论 -
二分查找和删除元素
数组是放在连续的内存空间中的数据结构,可通过索引直接定位 因为连续,所以删除 or 增加元素的时候有可能需要移动其他元素 所以数组不能删除,可以用覆盖进而删除 704:二分查找 Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its原创 2022-05-13 20:55:12 · 293 阅读 · 0 评论 -
两数之和_最长回文子串
1. Two sum Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return原创 2022-05-12 19:19:40 · 79 阅读 · 0 评论 -
Leetcode - 动态规划: 70-118-509
动态规划-Leetcode 509:斐波那契数 def fib(n: int) -> int: List = [0, 1] if n == 0 or n == 1: return n for i in range(2, n + 1): Sum = List[i - 1] + List[i - 2] List.append(Sum) return List[n] 动态规划-Leetcode 70:跳楼梯 假设你正在爬楼梯。原创 2022-01-28 21:18:56 · 541 阅读 · 0 评论