# ouvh/cp-training architecture

> Architecture diagram of the GitHub repository ouvh/cp-training, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ouvh/cp-training
- Repository: https://github.com/ouvh/cp-training

## Overview

##### “system” and its purpose
- This repository is a structured collection of C++ programming assignments and open‐problem solutions for competitive programming practice.
- There are no running services or networked components; instead it’s a “content distribution” and “code archive” system aimed at helping students organize, develop, and submit UVA‐style problem solutions.

##### Main components
a. Repository Root
- README.md (entry point with video links)
- .idea (IDE project settings for Assignment 5)
b. Assignment Modules
- Assignment 1, 2, 3, 4, 5 (each a folder)
– Problem PDF resources
– C++ source files (`*.cpp`)
– Subfolders for grouping by topic (e.g., “Set 1”, “DSU”, “Segment Tree”)
c. Open Problems Module
- A flat folder of additional challenge sources
d. External/Tooling Components
- C++ compiler toolchain (gcc/clang)
- Local IDE/editor
- UVA Online Judge (submission endpoint)

##### Relationships and data flows
- Developer pulls or clones the Git repo → modifies source files → builds with C++ compiler → runs locally or tests against sample data → submits accepted solutions to UVA
- PDF problem statements are referenced by the developer but not processed automatically
- IDE settings in `.idea` assist in debugging and local execution

##### Architectural patterns/design principles
- Clear modular separation: each assignment is a self‐contained module
- Consistent naming convention: “Assignment N”, “Set M”, problem IDs, and PDF pairing
- Folders map directly to problem categories (Graph Theory, DSU, Segment Tree, DP, etc.)

## Diagram (Mermaid)

```mermaid
flowchart TB
    Developer["Developer/IDE"]:::external -->|"clone/pull"| Repo["Git Repository"]:::storage

    subgraph "Git Repository"
        README["README.md"]:::doc
        subgraph "Assignment 1"
            A1Code["Graphs.cpp"]:::code
            A1PDF["Assignment#1_WarmingUP_Graphs.pdf"]:::doc
        end
        subgraph "Assignment 2"
            A2PDF["Assignment#2.pdf"]:::doc
            subgraph "Set 1"
                A2_1["1 - UVA 1062 Containers.cpp"]:::code
                A2_2["2 - UVA 10901 Ferry loading 3.cpp"]:::code
                A2_3["3 - UVA 10954 Add all.cpp"]:::code
            end
            subgraph "Set 2"
                A2_4["4 - UVA 700 Data bugs.cpp"]:::code
                A2_5["5- UVA 11173 Grey Codes.cpp"]:::code
            end
            subgraph "Set 3"
                A2_6["6 - UVA 12049 Just prune The list.cpp"]:::code
                A2_7["7- UVA 12504 Just updating a Dictionary.cpp"]:::code
            end
        end
        subgraph "Assignment 3"
            A3["Details collapsed"]:::code
        end
        subgraph "Assignment 4"
            A4["Details collapsed"]:::code
        end
        subgraph "Assignment 5"
            IDEA[".idea"]:::tool
            A5["Other .cpp files"]:::code
        end
        subgraph "Open Problems"
            OP["Multiple challenge .cpp"]:::code
        end
    end

    Repo -->|"compile"| Compiler["C++ Toolchain"]:::external
    Compiler -->|"run/test"| Developer
    Compiler -->|"submit"| UVA["UVA Online Judge"]:::external

    click README "https://github.com/ouvh/cp-training/blob/main/README.md"
    click A1Code "https://github.com/ouvh/cp-training/blob/main/Assignment 1/Graphs.cpp"
    click A1PDF "https://github.com/ouvh/cp-training/blob/main/Assignment 1/Assignment#1_WarmingUP_Graphs.pdf"
    click A2PDF "https://github.com/ouvh/cp-training/blob/main/Assignment 2/Assignment#2.pdf"
    click A2_1 "https://github.com/ouvh/cp-training/blob/main/Assignment 2/Set 1/1 - UVA 1062 Containers.cpp"
    click A2_2 "https://github.com/ouvh/cp-training/blob/main/Assignment 2/Set 1/2 - UVA 10901 Ferry loading 3.cpp"
    click A2_3 "https://github.com/ouvh/cp-training/blob/main/Assignment 2/Set 1/3 - UVA 10954 Add all.cpp"
    click A2_4 "https://github.com/ouvh/cp-training/blob/main/Assignment 2/Set 2/4 - UVA 700 Data bugs.cpp"
    click A2_5 "https://github.com/ouvh/cp-training/blob/main/Assignment 2/Set 2/5- UVA 11173 Grey Codes.cpp"
    click A2_6 "https://github.com/ouvh/cp-training/blob/main/Assignment 2/Set 3/6 - UVA 12049 Just prune  The list.cpp"
    click A2_7 "https://github.com/ouvh/cp-training/blob/main/Assignment 2/Set 3/7- UVA 12504 Just updating a Dictionary.cpp"
    click IDEA "https://github.com/ouvh/cp-training/blob/main/Assignment 5/.idea"

    classDef code fill:#D6EAF8,stroke:#3498DB,color:#1A5276
    classDef doc fill:#E9F7EF,stroke:#27AE60,color:#1E8449
    classDef external fill:#F2F3F4,stroke:#7F8C8D,color:#566573
    classDef storage fill:#EBDEF0,stroke:#8E44AD,color:#6C3483
    classDef tool fill:#FDEDEC,stroke:#C0392B,color:#7B241C
```
