- ✅ Problem listing: https://leetcode.cn/circle/discuss/E3yavq/#%E6%8E%92%E5%BA%8F%E7%AE%97%E6%B3%95%E7%AF%87
- ✅ https://huxulm.github.io/lc-rating/list/data_structure 常用枚举技巧
- ✅ TODO: Practice https://blog.faangshui.com/p/before-leetcode
- TODO: Understand how to iterate in diagonal, see Code Template
| Problem | Difficulty | Note |
|---|---|---|
| 1512. Number of Good Pairs | Easy | Count frequency of seen. |
| 1679. Max Number of K-Sum Pairs | Medium (1345) | Variant of 1. Two Sum |
| **1010. Pairs of Songs With Total Durations Divisible by 60 | Medium (1377) | Pair 60 - (t % 60) or t % 60 == 0. |
| 219. Contains Duplicate II | Easy | Sliding window [i - k, i]. |
| **624. Maximum Distance in Arrays | Medium | Prefix max/min from opposite ends. |
| **1031. Maximum Sum of Two Non-Overlapping Subarrays | Medium (1680) | [First,Second] or [Second,First] + prefix sum. |
| 1014. Best Sightseeing Pair | Medium (1730) | Seen values[i] + i, enumerate values[j] - j. |
| 1814. Count Nice Pairs in an Array | Medium (1737) | Seen A - rev(A), enumerate B - rev(B). |
| Problem | Difficulty | Note |
|---|---|---|
| 238. Product of Array Except Self | Medium | Prefix / suffix product. |
| 2909. Minimum Sum of Mountain Triplets II | Medium (1478) | Fix middle, trakc min lefet and right. |
| 2874. Maximum Value of an Ordered Triplet II | Medium (1583) | Prefix max, maxDiff. |
| Problem | Difficulty |
|---|---|
| 283. Move Zeroes | Easy |
| 189. Rotate Array | Medium |
| 665. Non-decreasing Array | Medium |
| Problem | Difficulty |
|---|
| Problem | Difficulty |
|---|
- https://leetcode.com/problems/pascals-triangle/description/ e
- https://leetcode.com/problems/pascals-triangle-ii/ e
- https://leetcode.com/problems/reshape-the-matrix/description/ e
- https://leetcode.com/problems/image-smoother/description/ e
- https://leetcode.com/problems/battleships-in-a-board/description/ m
- https://leetcode.com/problems/game-of-life/description/ m
- https://leetcode.com/problems/diagonal-traverse/description/
| Problem | Difficulty | Note |
|---|---|---|
| 989. Add to Array-Form of Integer | Easy | Simulation. |
| 334. Increasing Triplet Subsequence | Medium | Mind the check order of first and second. |
| 581. Shortest Unsorted Continuous Subarray | Medium | Prefix max + suffix min. |
| 941. Valid Mountain Array | Easy | |
| 845. Longest Mountain in Array | Medium | |
| 73. Set Matrix Zeroes | Medium | Use first row and column as markers |
| 766. Toeplitz Matrix | Easy | |
| 48. Rotate Image | Medium | |
| 54. Spiral Matrix | Medium | |
| 59. Spiral Matrix II | Medium | |
| 189. Rotate Array | Medium | |
| Easy | ||
| Medium |
| Problem | Difficulty |
|---|---|
| 912. Sort an Array | Medium |
| 75. Sort Colors | Medium |
| 148. Sort List | Medium |