---
# System prepended metadata

title: LeetCode Solution Approach
tags: [LeetCode]

---

<!-- 
#### <span style="color: green">Easy</span>
#### <span style="color: orange">Medium</span>
#### <span style="color: red">Hard</span>
-->

# LeetCode Solution Approach
The LeetCode solution I've made will be a list of articles that each article contains 100 problems. All of them are written using Python3, some of them includes both the most common solutions and advanced solutions:

*\* Use `CTRL+F` to fast-forward to the target problem.*

### Algorithm categories ↓

<hr>

<!-- ## Maching Problems
 -->

## Graph/DFS/BFS/Heap Problems
#### <span style="color: green">Easy</span>
- [94. Binary Tree Inorder Traversal](https://hackmd.io/@dANNy1209/BJrfzwb4eg)
- [1971. Find if Path Exists in Graph](https://hackmd.io/@dANNy1209/rJnuf7tmll)
#### <span style="color: orange">Medium</span>
- [114. Flatten Binary Tree to Linked List](https://hackmd.io/@dANNy1209/SyhfEOZNgg)
- [116. Populating Next Right Pointers in Each Node](https://hackmd.io/@dANNy1209/H1HFKKM4ge)
- [130. Surrounded Regions](https://hackmd.io/@dANNy1209/rJUDmAWdee)
- [133. Clone Graph](https://hackmd.io/@dANNy1209/B1dRy5aXex)
- [200. Number of Islands](https://hackmd.io/@dANNy1209/BkDbb50Xex)
- [207. Course Schedule](https://hackmd.io/@dANNy1209/BkwNrlxVle)
- [230. Kth Smallest Element in a BST](https://hackmd.io/@dANNy1209/HJKnl5zEge)
- [341. Flatten Nested List Iterator](https://hackmd.io/@dANNy1209/rJe5zJVEgg)
- [378. Kth Smallest Element in a Sorted Matrix](https://hackmd.io/@dANNy1209/rJZCz_hwxg)
- [399. Evaluate Division](https://hackmd.io/@dANNy1209/H1OAJdlugl)
- [417. Pacific Atlantic Water Flow](https://hackmd.io/@dANNy1209/BJ2QRgRPeg)
- [419. Battleships in a Board](https://hackmd.io/@dANNy1209/Sy1ah2zNgg)
- [1038. Binary Search Tree to Greater Sum Tree](https://hackmd.io/@dANNy1209/B1QOuGFree)
- [1261. Find Elements in a Contaminated Binary Tree](https://hackmd.io/@dANNy1209/rJwGXRuUel)
- [1302. Deepest Leaves Sum](https://hackmd.io/@dANNy1209/B1eUGHfIlx)
- [1315. Sum of Nodes with Even-Valued Grandparent](https://hackmd.io/@dANNy1209/BJg-yZLLll)
- [2265. Count Nodes Equal to Average of Subtree](https://hackmd.io/@dANNy1209/HJZlRA3Sxg)
- [2415. Reverse Odd Levels of Binary Tree](https://hackmd.io/@dANNy1209/HypXG07rxx)
#### <span style="color: red">Hard</span>
- [1255. Maximum Score Words Formed by Letters](https://hackmd.io/@dANNy1209/SJHfABAEgx)

## Greedy Algorithm
#### <span style="color: green">Easy</span>
- [455. Assign Cookies](https://hackmd.io/@dANNy1209/S1PeHBYQee)
#### <span style="color: orange">Medium</span>
- [45. Jump Game II](https://hackmd.io/@dANNy1209/HyMvnRHvxx)
- [55. Jump Game](https://hackmd.io/@dANNy1209/BkUfjbzwxl)
- [56. Merge Intervals](https://hackmd.io/@dANNy1209/ryO3OA07lx)
- [106. Construct Binary Tree from Inorder and Postorder Traversal](https://hackmd.io/@dANNy1209/rJskG0VIle)
- [122. Best Time to Buy and Sell Stock II](https://hackmd.io/@dANNy1209/r1uz5k4Eee)
- [134. Gas Station](https://hackmd.io/@dANNy1209/B1-1nAbOxx)
- [435. Non-overlapping Intervals](https://hackmd.io/@dANNy1209/S1WkugbVxg)
- [452. Minimum Number of Arrows to Burst Balloons](https://hackmd.io/@dANNy1209/SJ7Ed7S4lx)
- [621. Task Scheduler](https://hackmd.io/@dANNy1209/HyN7uEB4ee)
- [763. Partition Labels](https://hackmd.io/@dANNy1209/BJWMTa2Lgx)
- [807. Max Increase to Keep City Skyline](https://hackmd.io/@dANNy1209/SJi0UxSBeg)
- [1282. Group the People Given the Group Size They Belong To](https://hackmd.io/@dANNy1209/Hk8XISHNgx)
- [1561. Maximum Number of Coins You Can Get](https://hackmd.io/@dANNy1209/HJ1bwypHle)
- [1605. Find Valid Matrix Given Row and Column Sums](https://hackmd.io/@dANNy1209/H1GD4uzIxg)
- [1689. Partitioning Into Minimum Number Of Deci-Binary Numbers](https://hackmd.io/@dANNy1209/S1Ld1BrEgl)
- [2294. Partition Array Such That Maximum Difference Is K](https://hackmd.io/@dANNy1209/BJBu3z8Ile)
- [2375. Construct Smallest Number From DI String](https://hackmd.io/@dANNy1209/SJ-uCv5Slg)
#### <span style="color: red">Hard</span>
- [42. Trapping Rain Water](https://hackmd.io/@dANNy1209/Hk1J5t2Pel)
- [410. Split Array Largest Sum](https://hackmd.io/@dANNy1209/SkeNoK8Vee)
- [502. IPO](https://hackmd.io/@dANNy1209/H1LktdINxg)

## Divide and Conquer
#### <span style="color: green">Easy</span>
- [88. Merge Sorted Array](https://hackmd.io/@dANNy1209/rym0pBtQel)
#### <span style="color: orange">Medium</span>
- [95. Unique Binary Search Trees II](https://hackmd.io/@dANNy1209/rJhNxNydxg)
- [105. Construct Binary Tree from Preorder and Inorder Traversal](https://hackmd.io/@dANNy1209/HydpD6j4gg)
- [109. Convert Sorted List to Binary Search Tree](https://hackmd.io/@dANNy1209/H1Hwq-rHlg)
- [148. Sort List](https://hackmd.io/@dANNy1209/SkHR_baBxx)
- [215. Kth Largest Element in an Array](https://hackmd.io/@dANNy1209/r1gsOVWNel)
- [347. Top K Frequent Elements](https://hackmd.io/@dANNy1209/B1MtBAoElg)
- [395. Longest Substring with At Least K Repeating Characters](https://hackmd.io/@dANNy1209/ryg-cYedel)
- [427. Construct Quad Tree](https://hackmd.io/@dANNy1209/S1YgoCwNel)
- [558. Logical OR of Two Binary Grids Represented as Quad-Trees](https://hackmd.io/@dANNy1209/HkzFcwyvxe)
- [654. Maximum Binary Tree](https://hackmd.io/@dANNy1209/Hk7bGhUEgg)
- [889. Construct Binary Tree from Preorder and Postorder Traversal](https://hackmd.io/@dANNy1209/ry4Ml_qVel)
- [912. Sort an Array](https://hackmd.io/@dANNy1209/r14U8XILgx)
- [973. K Closest Points to Origin](https://hackmd.io/@dANNy1209/SJC-uY9Elg)
- [1382. Balance a Binary Search Tree](https://hackmd.io/@dANNy1209/SJHCM3v4ee)
- [1738. Find Kth Largest XOR Coordinate Value](https://hackmd.io/@dANNy1209/HJH34uqrgl)
- [3537. Fill a Special Grid](https://hackmd.io/@dANNy1209/S1AeWedNll)

## Dynamic Programming
#### <span style="color: green">Easy</span>
- [70. Climbing Stairs](https://hackmd.io/@dANNy1209/Syc7Rd67el)
- [118. Pascal's Triangle](https://hackmd.io/@dANNy1209/S111tOMrlg)
- [338. Counting Bits](https://hackmd.io/@dANNy1209/Sym3muzrxe)
#### <span style="color: orange">Medium</span>
- [53. Maximum Subarray](https://hackmd.io/@dANNy1209/rkWnoA2Igx)
- [62. Unique Paths](https://hackmd.io/@dANNy1209/rksuZJUwel)
- [131. Palindrome Partitioning](https://hackmd.io/@dANNy1209/Sk0TZICHxl)
- [152. Maximum Product Subarray](https://hackmd.io/@dANNy1209/BJi8OZUwex)
- [241. Different Ways to Add Parentheses](https://hackmd.io/@dANNy1209/BJx-upsHlx)
- [300. Longest Increasing Subsequence](https://hackmd.io/@dANNy1209/r1Bj_sCmxe)
- [322. Coin Change](https://hackmd.io/@dANNy1209/H1gOHGbEll)
- [542. 01 Matrix](https://hackmd.io/@dANNy1209/BykxqSyuee)
- [647. Palindromic Substrings](https://hackmd.io/@dANNy1209/SkRP1VUIle)
- [894. All Possible Full Binary Trees](https://hackmd.io/@dANNy1209/H1hcPHp4gg)
- [983. Minimum Cost For Tickets](https://hackmd.io/@dANNy1209/HJJ8napPex)
- [1043. Partition Array for Maximum Sum](https://hackmd.io/@dANNy1209/SJuYBvfHxx)
- [1140. Stone Game II](https://hackmd.io/@dANNy1209/Sk_EjZFHex)
- [1186. Maximum Subarray Sum with One Deletion](https://hackmd.io/@dANNy1209/r1K_iHiweg)
- [1277. Count Square Submatrices with All Ones](https://hackmd.io/@dANNy1209/SJtD_mZBxe)
- [1638. Count Substrings That Differ by One Character](https://hackmd.io/@dANNy1209/B1F9jkS8lx)
- [1641. Count Sorted Vowel Strings](https://hackmd.io/@dANNy1209/SJisnGWSxe)
- [1884. Egg Drop With 2 Eggs and N Floors](https://hackmd.io/@dANNy1209/Skho53mSlx)

## Hash Table Problems
#### <span style="color: orange">Medium</span>
- [49. Group Anagrams](https://hackmd.io/@dANNy1209/BJ-P71GOge)

## Miscellaneous
#### <span style="color: green">Easy</span>
- [704. Binary Search](https://hackmd.io/@dANNy1209/rJH8o0yEge)

## Uncategorized
- [Problems through 1 ~ 100](https://hackmd.io/@dANNy1209/BJ3k4E60C)

