# leetcode-python-java [https://github.com/leetcode-python-java/leetcode-python-java](https://github.com/leetcode-python-java/leetcode-python-java) Sharing the most comprehensive LeetCode solutions, fully supporting Python, Java, C++, JavaScript, C#, Go, Ruby, Rust, C, Kotlin, Swift, PHP, and Dart. For a better web experience, please visit: [https://www.leader.me/leetcode/](https://www.leader.me/leetcode/) ## Array [View on leader.me](https://www.leader.me/leetcode/en/tags/1) - [26](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/26-remove-duplicates-from-sorted-array.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/26-remove-duplicates-from-sorted-array.md)), [27](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/27-remove-element.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/27-remove-element.md)), [49](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/49-group-anagrams.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/49-group-anagrams.md)), [59](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/59-spiral-matrix-ii.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/59-spiral-matrix-ii.md)), [75](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/75-sort-colors.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/75-sort-colors.md)), [88](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/88-merge-sorted-array.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/88-merge-sorted-array.md)), [117](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/117-populating-next-right-pointers-in-each-node-ii.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/117-populating-next-right-pointers-in-each-node-ii.md)), [119](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/119-pascals-triangle-ii.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/119-pascals-triangle-ii.md)), [169](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/169-majority-element.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/169-majority-element.md)), [209](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/209-minimum-size-subarray-sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/209-minimum-size-subarray-sum.md)), [238](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/238-product-of-array-except-self.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/238-product-of-array-except-self.md)), [303](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/303-range-sum-query-immutable.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/303-range-sum-query-immutable.md)), [344](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/344-reverse-string.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/344-reverse-string.md)), [349](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/349-intersection-of-two-arrays.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/349-intersection-of-two-arrays.md)), [443](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/443-string-compression.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/443-string-compression.md)), [605](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/605-can-place-flowers.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/605-can-place-flowers.md)), [704](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/704-binary-search.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/704-binary-search.md)), [977](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/977-squares-of-a-sorted-array.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/977-squares-of-a-sorted-array.md)), [1431](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1431-kids-with-the-greatest-number-of-candies.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1431-kids-with-the-greatest-number-of-candies.md)), [1732](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1732-find-the-highest-altitude.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1732-find-the-highest-altitude.md)), [1833](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1833-maximum-ice-cream-bars.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1833-maximum-ice-cream-bars.md)), [1840](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1840-maximum-building-height.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1840-maximum-building-height.md)), [3478](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/3001-4000/3478-choose-k-elements-with-maximum-sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/3001-4000/3478-choose-k-elements-with-maximum-sum.md)) ### Heap Sort (Priority Queue) [View on leader.me](https://www.leader.me/leetcode/en/tags/33) - [3478](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/3001-4000/3478-choose-k-elements-with-maximum-sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/3001-4000/3478-choose-k-elements-with-maximum-sum.md)) ### Matrix/Grid [View on leader.me](https://www.leader.me/leetcode/en/tags/2) - [59](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/59-spiral-matrix-ii.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/59-spiral-matrix-ii.md)) #### Brute Force Algorithm [View on leader.me](https://www.leader.me/leetcode/en/tags/17) #### LeetCode 75 [View on leader.me](https://www.leader.me/leetcode/en/tags/75) #### SQL 50 [View on leader.me](https://www.leader.me/leetcode/en/tags/50) ### Pre-Computation Techniques [View on leader.me](https://www.leader.me/leetcode/en/tags/38) - [238](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/238-product-of-array-except-self.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/238-product-of-array-except-self.md)) #### Prefix Sum [View on leader.me](https://www.leader.me/leetcode/en/tags/156) - [1732](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1732-find-the-highest-altitude.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1732-find-the-highest-altitude.md)) ## Backtracking Algorithm [View on leader.me](https://www.leader.me/leetcode/en/tags/11) ## Binary Search [View on leader.me](https://www.leader.me/leetcode/en/tags/151) - [349](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/349-intersection-of-two-arrays.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/349-intersection-of-two-arrays.md)) ## Counting [View on leader.me](https://www.leader.me/leetcode/en/tags/160) - [1189](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1189-maximum-number-of-balloons.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1189-maximum-number-of-balloons.md)) ## Design [View on leader.me](https://www.leader.me/leetcode/en/tags/154) - [232](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/232-implement-queue-using-stacks.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/232-implement-queue-using-stacks.md)) ## Dynamic Programming [View on leader.me](https://www.leader.me/leetcode/en/tags/12) - [5](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/5-longest-palindromic-substring.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/5-longest-palindromic-substring.md)), [53](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/53-maximum-subarray.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/53-maximum-subarray.md)), [72](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/72-edit-distance.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/72-edit-distance.md)), [119](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/119-pascals-triangle-ii.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/119-pascals-triangle-ii.md)), [392](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/392-is-subsequence.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/392-is-subsequence.md)), [416](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/416-partition-equal-subset-sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/416-partition-equal-subset-sum.md)), [474](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/474-ones-and-zeroes.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/474-ones-and-zeroes.md)), [494](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/494-target-sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/494-target-sum.md)), [509](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/509-fibonacci-number.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/509-fibonacci-number.md)), [583](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/583-delete-operation-for-two-strings.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/583-delete-operation-for-two-strings.md)), [1049](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1049-last-stone-weight-ii.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1049-last-stone-weight-ii.md)), [3494](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/3001-4000/3494-find-the-minimum-amount-of-time-to-brew-potions.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/3001-4000/3494-find-the-minimum-amount-of-time-to-brew-potions.md)) ### House Robber [View on leader.me](https://www.leader.me/leetcode/en/tags/18) ### Knapsack Problem [View on leader.me](https://www.leader.me/leetcode/en/tags/19) - [416](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/416-partition-equal-subset-sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/416-partition-equal-subset-sum.md)), [474](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/474-ones-and-zeroes.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/474-ones-and-zeroes.md)), [494](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/494-target-sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/494-target-sum.md)), [1049](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1049-last-stone-weight-ii.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1049-last-stone-weight-ii.md)) #### 0/1 Knapsack Problem [View on leader.me](https://www.leader.me/leetcode/en/tags/20) - [416](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/416-partition-equal-subset-sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/416-partition-equal-subset-sum.md)), [474](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/474-ones-and-zeroes.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/474-ones-and-zeroes.md)), [494](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/494-target-sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/494-target-sum.md)), [1049](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1049-last-stone-weight-ii.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1049-last-stone-weight-ii.md)) #### Stock Maximum Profit [View on leader.me](https://www.leader.me/leetcode/en/tags/22) #### Unbounded Knapsack [View on leader.me](https://www.leader.me/leetcode/en/tags/21) ### Palindrome [View on leader.me](https://www.leader.me/leetcode/en/tags/34) - [5](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/5-longest-palindromic-substring.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/5-longest-palindromic-substring.md)), [125](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/125-valid-palindrome.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/125-valid-palindrome.md)) ### Subsequence Problems [View on leader.me](https://www.leader.me/leetcode/en/tags/23) - [72](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/72-edit-distance.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/72-edit-distance.md)), [392](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/392-is-subsequence.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/392-is-subsequence.md)), [583](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/583-delete-operation-for-two-strings.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/583-delete-operation-for-two-strings.md)) ## Graph Theory [View on leader.me](https://www.leader.me/leetcode/en/tags/14) - [797](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/797-all-paths-from-source-to-target.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/797-all-paths-from-source-to-target.md)), [1042](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1042-flower-planting-with-no-adjacent.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1042-flower-planting-with-no-adjacent.md)) ### A* Algorithm [View on leader.me](https://www.leader.me/leetcode/en/tags/32) ### Breadth-First Search [View on leader.me](https://www.leader.me/leetcode/en/tags/30) - [117](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/117-populating-next-right-pointers-in-each-node-ii.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/117-populating-next-right-pointers-in-each-node-ii.md)) ### Depth-First Search [View on leader.me](https://www.leader.me/leetcode/en/tags/31) - [797](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/797-all-paths-from-source-to-target.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/797-all-paths-from-source-to-target.md)) ### Minimum Spanning Tree [View on leader.me](https://www.leader.me/leetcode/en/tags/25) #### Kruskal's Algorithm [View on leader.me](https://www.leader.me/leetcode/en/tags/26) ### UnionFind [View on leader.me](https://www.leader.me/leetcode/en/tags/24) ## Greedy Algorithm [View on leader.me](https://www.leader.me/leetcode/en/tags/10) - [53](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/53-maximum-subarray.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/53-maximum-subarray.md)), [334](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/334-increasing-triplet-subsequence.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/334-increasing-triplet-subsequence.md)), [605](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/605-can-place-flowers.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/605-can-place-flowers.md)), [1042](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1042-flower-planting-with-no-adjacent.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1042-flower-planting-with-no-adjacent.md)), [1833](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1833-maximum-ice-cream-bars.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1833-maximum-ice-cream-bars.md)) ## Hash Table [View on leader.me](https://www.leader.me/leetcode/en/tags/4) - [1](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/1-two-sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/1-two-sum.md)), [15](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/15-3sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/15-3sum.md)), [49](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/49-group-anagrams.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/49-group-anagrams.md)), [169](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/169-majority-element.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/169-majority-element.md)), [202](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/202-happy-number.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/202-happy-number.md)), [242](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/242-valid-anagram.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/242-valid-anagram.md)), [349](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/349-intersection-of-two-arrays.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/349-intersection-of-two-arrays.md)), [383](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/383-ransom-note.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/383-ransom-note.md)), [454](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/454-4sum-ii.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/454-4sum-ii.md)), [1189](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1189-maximum-number-of-balloons.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1189-maximum-number-of-balloons.md)) ## LeetCode Top 100 Liked [View on leader.me](https://www.leader.me/leetcode/en/tags/100) ## LeetCode Top Interview 150 [View on leader.me](https://www.leader.me/leetcode/en/tags/150) - [1](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/1-two-sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/1-two-sum.md)), [15](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/15-3sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/15-3sum.md)), [19](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/19-remove-nth-node-from-end-of-list.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/19-remove-nth-node-from-end-of-list.md)), [20](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/20-valid-parentheses.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/20-valid-parentheses.md)), [27](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/27-remove-element.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/27-remove-element.md)), [28](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/28-find-the-index-of-the-first-occurrence-in-a-string.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/28-find-the-index-of-the-first-occurrence-in-a-string.md)), [49](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/49-group-anagrams.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/49-group-anagrams.md)), [88](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/88-merge-sorted-array.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/88-merge-sorted-array.md)), [202](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/202-happy-number.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/202-happy-number.md)), [209](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/209-minimum-size-subarray-sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/209-minimum-size-subarray-sum.md)), [242](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/242-valid-anagram.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/242-valid-anagram.md)), [383](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/383-ransom-note.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/383-ransom-note.md)), [392](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/392-is-subsequence.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/392-is-subsequence.md)) ## Linked List [View on leader.me](https://www.leader.me/leetcode/en/tags/3) - [19](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/19-remove-nth-node-from-end-of-list.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/19-remove-nth-node-from-end-of-list.md)), [24](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/24-swap-nodes-in-pairs.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/24-swap-nodes-in-pairs.md)), [160](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/160-intersection-of-two-linked-lists.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/160-intersection-of-two-linked-lists.md)), [203](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/203-remove-linked-list-elements.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/203-remove-linked-list-elements.md)), [206](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/206-reverse-linked-list.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/206-reverse-linked-list.md)), [707](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/707-design-linked-list.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/707-design-linked-list.md)) ## Math [View on leader.me](https://www.leader.me/leetcode/en/tags/159) - [1344](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1344-angle-between-hands-of-a-clock.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1344-angle-between-hands-of-a-clock.md)), [1840](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1840-maximum-building-height.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1840-maximum-building-height.md)) ## Other Algorithm [View on leader.me](https://www.leader.me/leetcode/en/tags/36) ### Recursion [View on leader.me](https://www.leader.me/leetcode/en/tags/35) ## Prim's algorithm [View on leader.me](https://www.leader.me/leetcode/en/tags/157) ## Queue [View on leader.me](https://www.leader.me/leetcode/en/tags/8) - [225](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/225-implement-stack-using-queues.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/225-implement-stack-using-queues.md)), [232](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/232-implement-queue-using-stacks.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/232-implement-queue-using-stacks.md)) ## Shortest Path [View on leader.me](https://www.leader.me/leetcode/en/tags/158) ### Bellman-Ford Algorithm [View on leader.me](https://www.leader.me/leetcode/en/tags/28) ### Dijkstra's Algorithm [View on leader.me](https://www.leader.me/leetcode/en/tags/27) ### Floyd–Warshall Algorithm [View on leader.me](https://www.leader.me/leetcode/en/tags/29) ## Simulation [View on leader.me](https://www.leader.me/leetcode/en/tags/153) - [3612](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/3001-4000/3612-process-string-with-special-operations-i.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/3001-4000/3612-process-string-with-special-operations-i.md)), [3614](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/3001-4000/3614-process-string-with-special-operations-ii.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/3001-4000/3614-process-string-with-special-operations-ii.md)) ## Sorting [View on leader.me](https://www.leader.me/leetcode/en/tags/152) - [75](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/75-sort-colors.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/75-sort-colors.md)), [349](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/349-intersection-of-two-arrays.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/349-intersection-of-two-arrays.md)), [1833](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1833-maximum-ice-cream-bars.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1833-maximum-ice-cream-bars.md)), [1840](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1840-maximum-building-height.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1840-maximum-building-height.md)) ### Counting Sort [View on leader.me](https://www.leader.me/leetcode/en/tags/161) - [1833](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1833-maximum-ice-cream-bars.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1833-maximum-ice-cream-bars.md)) ## Stack [View on leader.me](https://www.leader.me/leetcode/en/tags/7) - [13](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/13-roman-to-integer.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/13-roman-to-integer.md)), [20](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/20-valid-parentheses.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/20-valid-parentheses.md)), [225](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/225-implement-stack-using-queues.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/225-implement-stack-using-queues.md)), [232](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/232-implement-queue-using-stacks.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/232-implement-queue-using-stacks.md)) ### Monotonic Stack [View on leader.me](https://www.leader.me/leetcode/en/tags/13) ## String [View on leader.me](https://www.leader.me/leetcode/en/tags/5) - [14](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/14-longest-common-prefix.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/14-longest-common-prefix.md)), [28](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/28-find-the-index-of-the-first-occurrence-in-a-string.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/28-find-the-index-of-the-first-occurrence-in-a-string.md)), [58](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/58-length-of-last-word.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/58-length-of-last-word.md)), [125](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/125-valid-palindrome.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/125-valid-palindrome.md)), [151](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/151-reverse-words-in-a-string.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/151-reverse-words-in-a-string.md)), [345](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/345-reverse-vowels-of-a-string.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/345-reverse-vowels-of-a-string.md)), [459](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/459-repeated-substring-pattern.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/459-repeated-substring-pattern.md)), [541](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/541-reverse-string-ii.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/541-reverse-string-ii.md)), [833](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/833-find-and-replace-in-string.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/833-find-and-replace-in-string.md)), [1071](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1071-greatest-common-divisor-of-strings.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1071-greatest-common-divisor-of-strings.md)), [1189](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1189-maximum-number-of-balloons.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1189-maximum-number-of-balloons.md)), [1768](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1001-2000/1768-merge-strings-alternately.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1001-2000/1768-merge-strings-alternately.md)), [3612](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/3001-4000/3612-process-string-with-special-operations-i.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/3001-4000/3612-process-string-with-special-operations-i.md)), [3614](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/3001-4000/3614-process-string-with-special-operations-ii.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/3001-4000/3614-process-string-with-special-operations-ii.md)) ## Tree [View on leader.me](https://www.leader.me/leetcode/en/tags/155) - [117](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/117-populating-next-right-pointers-in-each-node-ii.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/117-populating-next-right-pointers-in-each-node-ii.md)) ### Binary Tree [View on leader.me](https://www.leader.me/leetcode/en/tags/9) - [117](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/117-populating-next-right-pointers-in-each-node-ii.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/117-populating-next-right-pointers-in-each-node-ii.md)) ## Two Pointers [View on leader.me](https://www.leader.me/leetcode/en/tags/6) - [1](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/1-two-sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/1-two-sum.md)), [15](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/15-3sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/15-3sum.md)), [18](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/18-4sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/18-4sum.md)), [75](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/75-sort-colors.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/75-sort-colors.md)), [209](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/209-minimum-size-subarray-sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/209-minimum-size-subarray-sum.md)), [344](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/344-reverse-string.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/344-reverse-string.md)), [349](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/349-intersection-of-two-arrays.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/349-intersection-of-two-arrays.md)), [392](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/392-is-subsequence.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/392-is-subsequence.md)), [977](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/977-squares-of-a-sorted-array.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/977-squares-of-a-sorted-array.md)) ### Fast & Slow Pointers Technique [View on leader.me](https://www.leader.me/leetcode/en/tags/16) - [209](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/209-minimum-size-subarray-sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/209-minimum-size-subarray-sum.md)), [443](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/443-string-compression.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/443-string-compression.md)) ### Sliding Window [View on leader.me](https://www.leader.me/leetcode/en/tags/15) - [209](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/209-minimum-size-subarray-sum.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/209-minimum-size-subarray-sum.md)) ### left & right pointers [View on leader.me](https://www.leader.me/leetcode/en/tags/37) - [345](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/en/1-1000/345-reverse-vowels-of-a-string.md) ([zh](https://github.com/leetcode-python-java/leetcode-python-java/blob/main/zh/1-1000/345-reverse-vowels-of-a-string.md))