# greenbinjack/code-library architecture

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

- Interactive diagram: https://gitdiagram.com/greenbinjack/code-library
- Repository: https://github.com/greenbinjack/code-library

## Overview

This repository is a competitive-programming notebook: standalone C++ templates and snippets, rather than an application with a single user-to-result runtime. A programmer selects an algorithm and incorporates it into a solution. The graph groups the major algorithm domains and represents only relationships visible inside sampled implementations; the independent templates generally have no supported cross-module calls. The README is empty, so unsampled capabilities are identified from the file tree, not assumed to be integrated.

Main entry points: [`[02]Math/bigint.cpp`](https://github.com/greenbinjack/code-library/blob/main/%5B02%5DMath/bigint.cpp) (Big Integer), [`[00]sublime build/code snippet.cpp`](https://github.com/greenbinjack/code-library/blob/main/%5B00%5Dsublime%20build/code%20snippet.cpp) (Algorithm Templates), [`[01]Data Structures/segment tree another code.cpp`](https://github.com/greenbinjack/code-library/blob/main/%5B01%5DData%20Structures/segment%20tree%20another%20code.cpp) (Range Structures), [`[02]Math`](https://github.com/greenbinjack/code-library/tree/main/%5B02%5DMath) (Number Theory And Transforms)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data Structures"]
  node_range_structures["Range Structures"]
  node_persistent_tree["Persistent Tree<br/>[PST.cpp]"]
  node_other_structures["Other Structures"]
end

subgraph group_math["Math"]
  node_bigint["Big Integer<br/>[bigint.cpp]"]
  node_math_algorithms["Number Theory And Transforms"]
end

subgraph group_graph["Graph Algorithms"]
  node_tree_queries["Tree Queries<br/>[LCA.cpp]"]
  node_graph_algorithms["Graph Algorithms"]
end

subgraph group_optimization["DP And Greedy"]
  node_li_chao["Li Chao Tree<br/>[LiChaoTree.cpp]"]
  node_dp_greedy["DP And Greedy"]
end

subgraph group_strings["String Algorithms"]
  node_string_index["Suffix Array"]
  node_string_algorithms["String Algorithms"]
end

subgraph group_geometry["Geometry"]
  node_geometry2d["2D Geometry<br/>[2D everything.cpp]"]
  node_geometry_algorithms["Geometry Algorithms"]
end

node_programmer(("Programmer"))
node_snippets["Algorithm Templates<br/>[code snippet.cpp]"]

node_programmer -.->|"selects template"| node_snippets
node_snippets -.->|"incorporates code"| node_range_structures
node_programmer -.->|"uses arithmetic"| node_bigint
node_programmer -.->|"queries trees"| node_tree_queries
node_programmer -.->|"solves graph problems"| node_graph_algorithms
node_programmer -.->|"solves geometry problems"| node_geometry2d
node_programmer -.->|"indexes strings"| node_string_index
node_programmer -.->|"optimizes DP"| node_li_chao
node_bigint -.->|"multiplies via FFT"| node_math_algorithms

click node_snippets "https://github.com/greenbinjack/code-library/blob/main/%5B00%5Dsublime%20build/code%20snippet.cpp"
click node_range_structures "https://github.com/greenbinjack/code-library/blob/main/%5B01%5DData%20Structures/segment%20tree%20another%20code.cpp"
click node_persistent_tree "https://github.com/greenbinjack/code-library/blob/main/%5B01%5DData%20Structures/PST.cpp"
click node_other_structures "https://github.com/greenbinjack/code-library/tree/main/%5B01%5DData%20Structures"
click node_bigint "https://github.com/greenbinjack/code-library/blob/main/%5B02%5DMath/bigint.cpp"
click node_math_algorithms "https://github.com/greenbinjack/code-library/tree/main/%5B02%5DMath"
click node_tree_queries "https://github.com/greenbinjack/code-library/blob/main/%5B03%5DGraph/LCA.cpp"
click node_graph_algorithms "https://github.com/greenbinjack/code-library/tree/main/%5B03%5DGraph"
click node_li_chao "https://github.com/greenbinjack/code-library/blob/main/%5B04%5DDP/LiChaoTree.cpp"
click node_dp_greedy "https://github.com/greenbinjack/code-library/tree/main/%5B04%5DDP"
click node_string_index "https://github.com/greenbinjack/code-library/blob/main/%5B05%5DString/suffix%20array%20shohag%20template.cpp"
click node_string_algorithms "https://github.com/greenbinjack/code-library/tree/main/%5B05%5DString"
click node_geometry2d "https://github.com/greenbinjack/code-library/blob/main/%5B06%5DGeometry/2D%20everything.cpp"
click node_geometry_algorithms "https://github.com/greenbinjack/code-library/tree/main/%5B06%5DGeometry"

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_range_structures,node_persistent_tree,node_other_structures toneBlue
class node_bigint,node_math_algorithms toneAmber
class node_tree_queries,node_graph_algorithms toneMint
class node_li_chao,node_dp_greedy toneRose
class node_string_index,node_string_algorithms,node_programmer toneIndigo
class node_geometry2d,node_geometry_algorithms,node_snippets toneTeal
```

## Components

### Data Structures

- [Range Structures](https://github.com/greenbinjack/code-library/blob/main/%5B01%5DData%20Structures/segment%20tree%20another%20code.cpp): `[01]Data Structures/segment tree another code.cpp`
- [Persistent Tree](https://github.com/greenbinjack/code-library/blob/main/%5B01%5DData%20Structures/PST.cpp): `[01]Data Structures/PST.cpp`
- [Other Structures](https://github.com/greenbinjack/code-library/tree/main/%5B01%5DData%20Structures): `[01]Data Structures`

### Math

- [Big Integer](https://github.com/greenbinjack/code-library/blob/main/%5B02%5DMath/bigint.cpp): `[02]Math/bigint.cpp`
- [Number Theory And Transforms](https://github.com/greenbinjack/code-library/tree/main/%5B02%5DMath): `[02]Math`

### Graph Algorithms

- [Tree Queries](https://github.com/greenbinjack/code-library/blob/main/%5B03%5DGraph/LCA.cpp): `[03]Graph/LCA.cpp`
- [Graph Algorithms](https://github.com/greenbinjack/code-library/tree/main/%5B03%5DGraph): `[03]Graph`

### DP And Greedy

- [Li Chao Tree](https://github.com/greenbinjack/code-library/blob/main/%5B04%5DDP/LiChaoTree.cpp): `[04]DP/LiChaoTree.cpp`
- [DP And Greedy](https://github.com/greenbinjack/code-library/tree/main/%5B04%5DDP): `[04]DP`

### String Algorithms

- [Suffix Array](https://github.com/greenbinjack/code-library/blob/main/%5B05%5DString/suffix%20array%20shohag%20template.cpp): `[05]String/suffix array shohag template.cpp`
- [String Algorithms](https://github.com/greenbinjack/code-library/tree/main/%5B05%5DString): `[05]String`

### Geometry

- [2D Geometry](https://github.com/greenbinjack/code-library/blob/main/%5B06%5DGeometry/2D%20everything.cpp): `[06]Geometry/2D everything.cpp`
- [Geometry Algorithms](https://github.com/greenbinjack/code-library/tree/main/%5B06%5DGeometry): `[06]Geometry`

### Other components

- **Programmer**
- [Algorithm Templates](https://github.com/greenbinjack/code-library/blob/main/%5B00%5Dsublime%20build/code%20snippet.cpp): `[00]sublime build/code snippet.cpp`

## Connections

- Programmer → Algorithm Templates: selects template
- Algorithm Templates → Range Structures: incorporates code
- Programmer → Big Integer: uses arithmetic
- Programmer → Tree Queries: queries trees
- Programmer → Graph Algorithms: solves graph problems
- Programmer → 2D Geometry: solves geometry problems
- Programmer → Suffix Array: indexes strings
- Programmer → Li Chao Tree: optimizes DP
- Big Integer → Number Theory And Transforms: multiplies via FFT
