LeetCode
LeetCode copied to clipboard
- [x] [88. Merge Sorted Array](https://leetcode.com/problems/merge-sorted-array) - [ ] 🟩 🌟[21. Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/) - [ ] 🟩 [977. Squares of a Sorted Array](https://leetcode.com/problems/squares-of-a-sorted-array/description/) - [ ] 🟨 [986....
题目归类
- [ ] [206. Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/) - [ ] [92. Reverse Linked List II](https://leetcode.com/problems/reverse-linked-list-ii/) - [ ] [25. Reverse Nodes in k-Group](https://leetcode.com/problems/reverse-nodes-in-k-group/) - Solution of 25 is based on...
## 30天内高频 - [x] [124. Binary Tree Maximum Path Sum](https://leetcode.com/problems/binary-tree-maximum-path-sum?envType=company&envId=doordash&favoriteSlug=doordash-thirty-days) - [x] [286. Walls and Gates](https://leetcode.com/problems/walls-and-gates/) - BFS (⚠️注意复杂度分析) - [x] [329. Longest Increasing Path in a Matrix](https://leetcode.com/problems/longest-increasing-path-in-a-matrix/) - DFS...
- [x] [2069. Walking Robot Simulation II](https://leetcode.com/problems/walking-robot-simulation-ii/) - [x] [874. Walking Robot Simulation](https://leetcode.com/problems/walking-robot-simulation/) - [x] [1814. Count Nice Pairs in an Array](https://leetcode.com/problems/count-nice-pairs-in-an-array/) - [x] [2768. Number of Black Blocks](https://leetcode.com/problems/number-of-black-blocks/) -...
- [ ] [691. Stickers to Spell Word](https://leetcode.com/problems/stickers-to-spell-word) - [x] 🟥🌟[489. Robot Room Cleaner](https://leetcode.com/problems/robot-room-cleaner) - [ ] 🟨🌟[301. Remove Invalid Parentheses](https://leetcode.com/problems/remove-invalid-parentheses) - [x] [20. Valid Parentheses](https://leetcode.com/problems/valid-parentheses/) [Stack] - [x] 🟨🌟[1963....
## Tree 处理 Tree 问题时,有几个要点可以考虑 1. 通常会用到 recursion,即对于当前树和子树的处理是类似的,即 `process(root)` 与 `process(root.left)` and `process(root.right)` 2. 考虑 edge cases 的处理,比如 null 节点,叶子节点等。 3. 分析对一个节点的处理,然后扩展到其他节点的处理。 4. 考虑对一个阶段的处理时,需不需要有返回值。 **关于需不需要有返回值的例子:** 关于 Tree 的问题,一般都会用到 recursion,只需要集中考虑每个节点如何处理。比如要返回什么、要更新什么。 -...
- [x] 🟩🌟 [42. Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water) - [x] 🟩🌟 [11. Container With Most Water](https://leetcode.com/problems/container-with-most-water/) - [x] 🟩 [238. Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/) - [ ] [407. Trapping Rain...