# doocs/leetcode architecture

> Architecture diagram of the GitHub repository doocs/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/doocs/leetcode
- Repository: https://github.com/doocs/leetcode

## Overview

This repository is a multilingual algorithm-answer collection: readers find a problem or topic, then inspect or reuse a solution in a supported language. The README documents LeetCode, contest, LCOF, LCOF2, LCCI, JavaScript, and database collections, alongside topic-focused algorithm material. The supplied tree directly shows LCCI answers and basic sorting implementations; other documented collections are retained as catalog branches, but their source paths are unavailable here. Sampled sorting programs demonstrate standalone input–algorithm–output behavior; no shared runtime or central dispatch is evidenced.

Main entry points: [`basic/sorting/MergeSort/Main.java`](https://github.com/doocs/leetcode/blob/main/basic/sorting/MergeSort/Main.java) (Input Driver), [`lcci/01.01.Is Unique/Solution.cpp`](https://github.com/doocs/leetcode/blob/main/lcci/01.01.Is%20Unique/Solution.cpp) (LCCI Answers), [`basic/sorting`](https://github.com/doocs/leetcode/tree/main/basic/sorting) (Sorting Algorithms), [`basic/sorting/QuickSort/Main.java`](https://github.com/doocs/leetcode/blob/main/basic/sorting/QuickSort/Main.java) (Quick Sort)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_problem_sets["Problem Sets"]
  node_leetcode_answers["LeetCode Answers"]
  node_contest_answers["Contest Answers"]
  node_lcof_answers["LCOF Answers"]
  node_lcof2_answers["LCOF2 Answers"]
  node_lcci_answers["LCCI Answers<br/>[Solution.cpp]"]
  node_js_practice["JavaScript Practice"]
  node_database_practice["Database Practice"]
end

subgraph group_topic_material["Topic Solutions"]
  node_basic_algorithms["Basic Algorithms<br/>[Main.java]"]
  node_sorting["Sorting Algorithms"]
end

subgraph group_internal_examples["Sampled Implementations"]
  node_input_driver["Input Driver<br/>[Main.java]"]
  node_merge_sort["Merge Sort<br/>[Main.java]"]
  node_sorted_output["Sorted Output<br/>[Main.java]"]
  node_quick_sort["Quick Sort<br/>[Main.java]"]
  node_heap_sort["Heap Sort<br/>[Main.java]"]
end

node_reader(("Reader"))

node_reader -->|"browses"| node_leetcode_answers
node_reader -->|"browses"| node_contest_answers
node_reader -->|"browses"| node_lcof_answers
node_reader -->|"browses"| node_lcof2_answers
node_reader -->|"browses"| node_lcci_answers
node_reader -->|"browses"| node_js_practice
node_reader -->|"browses"| node_database_practice
node_reader -->|"browses"| node_basic_algorithms
node_reader -->|"browses"| node_sorting
node_input_driver -->|"calls"| node_merge_sort
node_merge_sort -->|"produces"| node_sorted_output
node_input_driver -->|"calls"| node_quick_sort
node_input_driver -->|"calls"| node_heap_sort

click node_lcci_answers "https://github.com/doocs/leetcode/blob/main/lcci/01.01.Is%20Unique/Solution.cpp"
click node_basic_algorithms "https://github.com/doocs/leetcode/blob/main/basic/sorting/MergeSort/Main.java"
click node_sorting "https://github.com/doocs/leetcode/tree/main/basic/sorting"
click node_input_driver "https://github.com/doocs/leetcode/blob/main/basic/sorting/MergeSort/Main.java"
click node_merge_sort "https://github.com/doocs/leetcode/blob/main/basic/sorting/MergeSort/Main.java"
click node_sorted_output "https://github.com/doocs/leetcode/blob/main/basic/sorting/MergeSort/Main.java"
click node_quick_sort "https://github.com/doocs/leetcode/blob/main/basic/sorting/QuickSort/Main.java"
click node_heap_sort "https://github.com/doocs/leetcode/blob/main/basic/sorting/HeapSort/Main.java"

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_leetcode_answers,node_contest_answers,node_lcof_answers,node_lcof2_answers,node_lcci_answers,node_js_practice,node_database_practice toneBlue
class node_basic_algorithms,node_sorting toneAmber
class node_input_driver,node_merge_sort,node_sorted_output,node_quick_sort,node_heap_sort toneMint
class node_reader toneIndigo
```

## Components

### Problem Sets

- **LeetCode Answers**
- **Contest Answers**
- **LCOF Answers**
- **LCOF2 Answers**
- [LCCI Answers](https://github.com/doocs/leetcode/blob/main/lcci/01.01.Is%20Unique/Solution.cpp): `lcci/01.01.Is Unique/Solution.cpp`
- **JavaScript Practice**
- **Database Practice**

### Topic Solutions

- [Basic Algorithms](https://github.com/doocs/leetcode/blob/main/basic/sorting/MergeSort/Main.java): `basic/sorting/MergeSort/Main.java`
- [Sorting Algorithms](https://github.com/doocs/leetcode/tree/main/basic/sorting): `basic/sorting`

### Sampled Implementations

- [Input Driver](https://github.com/doocs/leetcode/blob/main/basic/sorting/MergeSort/Main.java): `basic/sorting/MergeSort/Main.java`
- [Merge Sort](https://github.com/doocs/leetcode/blob/main/basic/sorting/MergeSort/Main.java): `basic/sorting/MergeSort/Main.java`
- [Sorted Output](https://github.com/doocs/leetcode/blob/main/basic/sorting/MergeSort/Main.java): `basic/sorting/MergeSort/Main.java`
- [Quick Sort](https://github.com/doocs/leetcode/blob/main/basic/sorting/QuickSort/Main.java): `basic/sorting/QuickSort/Main.java`
- [Heap Sort](https://github.com/doocs/leetcode/blob/main/basic/sorting/HeapSort/Main.java): `basic/sorting/HeapSort/Main.java`

### Other components

- **Reader**

## Connections

- Reader → LeetCode Answers: browses
- Reader → Contest Answers: browses
- Reader → LCOF Answers: browses
- Reader → LCOF2 Answers: browses
- Reader → LCCI Answers: browses
- Reader → JavaScript Practice: browses
- Reader → Database Practice: browses
- Reader → Basic Algorithms: browses
- Reader → Sorting Algorithms: browses
- Input Driver → Merge Sort: calls
- Merge Sort → Sorted Output: produces
- Input Driver → Quick Sort: calls
- Input Driver → Heap Sort: calls
