4.7 KiB
study_deck_02
An Anki-exportable study deck for NeetCode DSA problems.
How It Works
-
Roadmap (
roadmap.org) — the tracker. Lists all NeetCode 150 topics and problems. ToggleTODO→DONEwithg c cin Emacs as you complete each one. Progress cookies ([/]) show topic completion. -
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
NEETCODEproperty linking back to the roadmap
-
Toolkit (
toolkit/) — your reference library:tricks.org— flashcards for patterns & tricks (exported to Anki)notes.org— deep implementation notes with explanations (exported to Anki)suggestions.org— pattern reference for quick lookup (not exported)
-
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
├── toolkit/
│ ├── tricks.org ← flashcards for patterns & tricks
│ ├── notes.org ← deep implementation notes
│ ├── suggestions.org ← pattern reference (not exported)
│ └── images/ ← diagrams, screenshots
└── 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 #+ANKI_DECK: study_deck_02 Header
Every .org file in this deck has #+ANKI_DECK: 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.
To override per-card, use :ANKI_DECK: in the properties drawer.
Roadmap Format
Each problem in roadmap.org uses a properties drawer to keep links tidy:
** 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:
* TODO 0217. Contains Duplicate :easy:
#+ANKI_DECK: 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:
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.mjsto includeneetcode250orblind75flags, or remove theneetcode150filter 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_02header. They'll all export to the same Anki deck. - Flashcards — add
** Front/** Backsections to any note for Anki-style cards (see rootAGENTS.mdfor format).
Backlinking Convention
Every .org file should link back to roadmap.org via a property:
- Problem notes use
:NEETCODE:linking to the roadmap heading - Toolkit/tricks use
:ROADMAP:linking to a relevant problem - Roadmap entries use
:TRICK:linking to relevant tricks
This keeps the web of links navigable in both directions — from roadmap to notes, from notes to tricks, and tricks back to problems.