# bladerunneryao/leetcode architecture

> Architecture diagram of the GitHub repository bladerunneryao/leetcode, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bladerunneryao/leetcode
- Repository: https://github.com/bladerunneryao/leetcode

## Overview

This is a personal NeetCode/LeetCode study wiki, not an application with a single runtime pipeline. Its principal loop is to consult the study map and review queue, solve a problem, assess the solution, and preserve reusable learning in the wiki and index. The README also documents raw-problem ingestion, practice scaffolding, notebooks, and history lookup. The supplied tree exposes solution files and scripts but not most wiki content; those documented areas are shown with null paths. Source samples show standalone solution implementations, not calls between them.

Main entry points: [`solutions/python`](https://github.com/bladerunneryao/leetcode/tree/main/solutions/python) (Python solutions), [`scripts/prepare_neetcode.py`](https://github.com/bladerunneryao/leetcode/blob/main/scripts/prepare_neetcode.py) (Practice scaffolding), [`scripts/validate_repository.py`](https://github.com/bladerunneryao/leetcode/blob/main/scripts/validate_repository.py) (Metadata validation), [`scripts/ingest_neetcode_raw.py`](https://github.com/bladerunneryao/leetcode/blob/main/scripts/ingest_neetcode_raw.py) (Raw ingestion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_study["Study workflow"]
  node_study_loop["Study and review"]
end

subgraph group_knowledge["Knowledge base"]
  node_index["Study map and queue"]
  node_raw["Problem facts"]
  node_wiki["Reusable patterns"]
  node_logs["Learning history"]
end

subgraph group_practice["Practice and tools"]
  node_solutions["Python solutions"]
  node_notebooks["Problem notebooks"]
end

subgraph group_automation["Repository scripts"]
  node_raw_ingest["Raw ingestion"]
  node_prepare["Practice scaffolding"]
  node_dashboard["Dashboard generation"]
  node_validation["Metadata validation"]
end

node_learner(("Learner / Pi Agent"))
node_leetcode(("LeetCode"))

node_learner -->|"starts or resumes"| node_study_loop
node_study_loop -->|"checks review queue"| node_index
node_study_loop -->|"consults problem facts"| node_raw
node_study_loop -->|"works on problem"| node_solutions
node_solutions -.->|"submits for feedback"| node_leetcode
node_learner -->|"requests assessment"| node_study_loop
node_study_loop -->|"records patterns"| node_wiki
node_study_loop -->|"updates map"| node_index
node_study_loop -->|"records progress"| node_logs
node_study_loop -.->|"experiments when requested"| node_notebooks
node_raw_ingest -->|"ingests batches"| node_raw
node_prepare -->|"creates scaffolds"| node_solutions
node_prepare -->|"creates notebooks"| node_notebooks
node_dashboard -->|"generates dashboard"| node_index
node_validation -->|"checks consistency"| node_index
node_validation -->|"checks metadata"| node_solutions

click node_solutions "https://github.com/bladerunneryao/leetcode/tree/main/solutions/python"
click node_raw_ingest "https://github.com/bladerunneryao/leetcode/blob/main/scripts/ingest_neetcode_raw.py"
click node_prepare "https://github.com/bladerunneryao/leetcode/blob/main/scripts/prepare_neetcode.py"
click node_dashboard "https://github.com/bladerunneryao/leetcode/blob/main/scripts/generate_dashboard.py"
click node_validation "https://github.com/bladerunneryao/leetcode/blob/main/scripts/validate_repository.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_study_loop toneBlue
class node_index,node_raw,node_wiki,node_logs toneAmber
class node_solutions,node_notebooks toneMint
class node_raw_ingest,node_prepare,node_dashboard,node_validation toneRose
class node_learner,node_leetcode toneIndigo
```

## Components

### Study workflow

- **Study and review**

### Knowledge base

- **Study map and queue**
- **Problem facts**
- **Reusable patterns**
- **Learning history**

### Practice and tools

- [Python solutions](https://github.com/bladerunneryao/leetcode/tree/main/solutions/python): `solutions/python`
- **Problem notebooks**

### Repository scripts

- [Raw ingestion](https://github.com/bladerunneryao/leetcode/blob/main/scripts/ingest_neetcode_raw.py): `scripts/ingest_neetcode_raw.py`
- [Practice scaffolding](https://github.com/bladerunneryao/leetcode/blob/main/scripts/prepare_neetcode.py): `scripts/prepare_neetcode.py`
- [Dashboard generation](https://github.com/bladerunneryao/leetcode/blob/main/scripts/generate_dashboard.py): `scripts/generate_dashboard.py`
- [Metadata validation](https://github.com/bladerunneryao/leetcode/blob/main/scripts/validate_repository.py): `scripts/validate_repository.py`

### Other components

- **Learner / Pi Agent**
- **LeetCode**

## Connections

- Learner / Pi Agent → Study and review: starts or resumes
- Study and review → Study map and queue: checks review queue
- Study and review → Problem facts: consults problem facts
- Study and review → Python solutions: works on problem
- Python solutions → LeetCode: submits for feedback
- Learner / Pi Agent → Study and review: requests assessment
- Study and review → Reusable patterns: records patterns
- Study and review → Study map and queue: updates map
- Study and review → Learning history: records progress
- Study and review → Problem notebooks: experiments when requested
- Raw ingestion → Problem facts: ingests batches
- Practice scaffolding → Python solutions: creates scaffolds
- Practice scaffolding → Problem notebooks: creates notebooks
- Dashboard generation → Study map and queue: generates dashboard
- Metadata validation → Study map and queue: checks consistency
- Metadata validation → Python solutions: checks metadata
