refactor: move DSA notes to org/study_deck_02/
Restructure NeetCode study materials into a dedicated Anki-exportable deck directory. Separates DSA problem notes from C++ flashcards. - Move roadmap.org from leetcode/out/ to org/study_deck_02/ - Move 200 note files from org/cpp/dsa/ to org/study_deck_02/dsa/ - Add #+PROPERTY: STUDY_DECK_02 to all org files for org-anki export - Simplify roadmap format: properties drawer replaces nested headings - Update NEETCODE backlinks in all note files - Update extract.mjs and scaffold-notes.mjs for new paths - Create org/study_deck_02/AGENTS.md with study workflow docs - Update root and leetcode AGENTS.md
This commit is contained in:
@@ -0,0 +1,123 @@
|
||||
# study_deck_02
|
||||
|
||||
An Anki-exportable study deck for NeetCode DSA problems.
|
||||
|
||||
## How It Works
|
||||
|
||||
1. **Roadmap** (`roadmap.org`) — the tracker. Lists all NeetCode 150 topics
|
||||
and problems. Toggle `TODO` → `DONE` with `g c c` in Emacs as you
|
||||
complete each one. Progress cookies (`[/]`) show topic completion.
|
||||
|
||||
2. **Notes** (`dsa/<topic>/<problem>.org`) — the real work. Each problem
|
||||
has its own file with:
|
||||
- Approach notes (write your own)
|
||||
- Python and C++ solution stubs
|
||||
- A `NEETCODE` property linking back to the roadmap
|
||||
|
||||
3. **Study flow** — open roadmap.org, pick a topic, pick a problem,
|
||||
follow the Notes link, solve it, mark it DONE in both places.
|
||||
|
||||
## File Layout
|
||||
|
||||
```
|
||||
org/study_deck_02/
|
||||
├── AGENTS.md ← you are here
|
||||
├── roadmap.org ← generated by leetcode/extract.mjs
|
||||
└── dsa/
|
||||
├── arrays-hashing/
|
||||
│ ├── 0217-contains-duplicate.org
|
||||
│ └── ...
|
||||
├── two-pointers/
|
||||
├── sliding-window/
|
||||
├── linked-list/
|
||||
├── binary-search/
|
||||
├── stack/
|
||||
├── trees/
|
||||
├── tries/
|
||||
├── heap-priority-queue/
|
||||
├── backtracking/
|
||||
├── graphs/
|
||||
├── advanced-graphs/
|
||||
├── 1-d-dynamic-programming/
|
||||
├── 2-d-dynamic-programming/
|
||||
├── greedy/
|
||||
├── intervals/
|
||||
├── math-geometry/
|
||||
└── bit-manipulation/
|
||||
```
|
||||
|
||||
18 topics, 199 problems (NeetCode 150).
|
||||
|
||||
## The `#+PROPERTY: STUDY_DECK_02` Header
|
||||
|
||||
Every `.org` file in this deck has `#+PROPERTY: STUDY_DECK_02` at the
|
||||
top. This tells org-anki which Anki deck to export into. Without it,
|
||||
the file won't be picked up by the exporter.
|
||||
|
||||
## Roadmap Format
|
||||
|
||||
Each problem in roadmap.org uses a properties drawer to keep links tidy:
|
||||
|
||||
```org
|
||||
** TODO 0217. Contains Duplicate :easy:
|
||||
:PROPERTIES:
|
||||
:LEETCODE: [[https://leetcode.com/problems/contains-duplicate/][Problem]]
|
||||
:CPP: [[https://github.com/neetcode-gh/leetcode/blob/main/cpp/0217-contains-duplicate.cpp][Solution]]
|
||||
:PYTHON: [[https://github.com/neetcode-gh/leetcode/blob/main/python/0217-contains-duplicate.py][Solution]]
|
||||
:VIDEO: [[https://youtube.com/watch?v=3OamzN90kPg][Watch]]
|
||||
:END:
|
||||
Notes: [[dsa/arrays-hashing/0217-contains-duplicate.org][My Solution]]
|
||||
```
|
||||
|
||||
Properties are hidden by default in Emacs (`TAB` to cycle). The Notes
|
||||
link is always visible — that's the one you click most.
|
||||
|
||||
## Notes Format
|
||||
|
||||
Each problem note links back to the roadmap via the `NEETCODE` property:
|
||||
|
||||
```org
|
||||
* TODO 0217. Contains Duplicate :easy:
|
||||
#+PROPERTY: STUDY_DECK_02
|
||||
:PROPERTIES:
|
||||
:NEETCODE: [[../../roadmap.org::*0217. Contains Duplicate][Roadmap]]
|
||||
:END:
|
||||
|
||||
** TODO Approach
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
|
||||
#+end_src
|
||||
```
|
||||
|
||||
## Regenerating
|
||||
|
||||
From the `leetcode/` directory:
|
||||
|
||||
```bash
|
||||
node extract.mjs # fetches fresh data, writes roadmap.org here
|
||||
node scaffold-notes.mjs # creates missing note files (skips existing)
|
||||
```
|
||||
|
||||
Extract pulls from neetcode.io (cached in `leetcode/.cache/`). Scaffold
|
||||
is idempotent — it only creates files that don't exist yet.
|
||||
|
||||
## Growing the Deck
|
||||
|
||||
This deck starts with NeetCode 150. To add more:
|
||||
|
||||
- **More problems** — edit `extract.mjs` to include `neetcode250` or
|
||||
`blind75` flags, or remove the `neetcode150` filter entirely.
|
||||
- **Custom topics** — add new folders under `dsa/`, create notes manually.
|
||||
- **Other sources** — create new folders alongside `dsa/` (e.g.,
|
||||
`euler/`, `advent-of-code/`) with the same `#+PROPERTY: STUDY_DECK_02`
|
||||
header. They'll all export to the same Anki deck.
|
||||
- **Flashcards** — add `** Front` / `** Back` sections to any note
|
||||
for Anki-style cards (see root `AGENTS.md` for format).
|
||||
Reference in New Issue
Block a user