feat: populate note files with problem descriptions and code stubs

Add populate-notes.mjs that fetches problem descriptions and
Python/C++ code stubs from LeetCode's GraphQL API. Populated
all 197 NeetCode 150 note files with:
- Problem description (examples, constraints)
- Python code stub (function signature)
- C++ code stub (function signature + includes)

API responses cached in leetcode/.cache/leetcode/ for instant re-runs.
This commit is contained in:
2026-06-01 17:22:07 +08:00
parent e798e449bd
commit 1dec88aaf2
198 changed files with 10459 additions and 534 deletions
@@ -1,18 +1,66 @@
#+PROPERTY: STUDY_DECK_02
* TODO 0322. Coin Change :medium:
:PROPERTIES:
:NEETCODE: [[file:../../roadmap.org::*0322. Coin Change][Roadmap]]
:NEETCODE: [[file:../../roadmap.org::*0322. Coin Change][0322. Coin Change]]
:END:
You are given an integer array ~coins~ representing coins of different denominations and an integer ~amount~ representing a total amount of money.
Return /the fewest number of coins that you need to make up that amount/. If that amount of money cannot be made up by any combination of the coins, return ~-1~.
You may assume that you have an infinite number of each kind of coin.
*Example 1:*
#+begin_src
Input: coins = [1,2,5], amount = 11
Output: 3
Explanation: 11 = 5 + 5 + 1
#+end_src
*Example 2:*
#+begin_src
Input: coins = [2], amount = 3
Output: -1
#+end_src
*Example 3:*
#+begin_src
Input: coins = [1], amount = 0
Output: 0
#+end_src
*Constraints:*
- ~1 <= coins.length <= 12~
- ~1 <= coins[i] <= 2^{31} - 1~
- ~0 <= amount <= 10^{4}~
** TODO Approach
Write your approach here.
** TODO Python
#+begin_src python
class Solution:
def coinChange(self, coins: List[int], amount: int) -> int:
#+end_src
** TODO C++
#+begin_src cpp
class Solution {
public:
int coinChange(vector<int>& coins, int amount) {
}
};
#+end_src