# nxhhoang/marisaoj-roadmap-solution architecture

> Architecture diagram of the GitHub repository nxhhoang/marisaoj-roadmap-solution, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nxhhoang/marisaoj-roadmap-solution
- Repository: https://github.com/nxhhoang/marisaoj-roadmap-solution

## Overview

##### Main Components
- Overall Repository (“MarisaOJ-roadmap-solution”): Represent this as the main container.
- Roadmap Component: Show that this repository organizes learning progress into separate “levels” and “topics.”
- Level Folders: Illustrate subcomponents for each level (level 0, level 1, level 2, level 3, level 4). Each level can be visualized as modules or sections.
- Topic Nodes: Within each level, there are multiple algorithms/topics (e.g., Bitmasks, Dynamic Programming, Graph, Backtracking, Prefix Sum, etc.). Each should be shown as a distinct module within its respective level.
- Problem/Exercise Units: Inside each topic’s folder, you see individual problem names and their associated solution files (code implementations, description files, solution notes in English and Vietnamese). Represent these as leaf nodes of the hierarchy.

##### Relationships and Interactions
- Versioning/Multiple Implementations: For each problem, show that there are multiple code versions (e.g., “code_v1.cpp”, “code_v2_space_optimize.cpp”) – you might annotate these as alternative solution nodes attached to the problem node.

##### Architectural Patterns and Design Principles
- Modular Organization: The repository is organized by learning levels and topics. Emphasize the separation between difficulty levels and topic areas.

## Diagram (Mermaid)

```mermaid
flowchart TD
    R["MarisaOJ-roadmap-solution"]:::repository
    RM["Roadmap"]:::roadmap
    R --> RM

    %% Levels Subgraph
    subgraph "Levels"
        L0["Level 0"]:::level
        L1["Level 1"]:::level
        L2["Level 2"]:::level
        L3["Level 3"]:::level
        L4["Level 4"]:::level
    end

    RM --> L0
    RM --> L1
    RM --> L2
    RM --> L3
    RM --> L4

    %% Level 0 Topics
    L0 --> L0OP["Other problems"]:::topic

    %% Level 1 Topics
    L1 --> BT["Backtracking"]:::topic
    L1 --> P["Permutation"]:::topic
    L1 --> PS["Prefix sum"]:::topic
    L1 --> S["Sorting"]:::topic

    %% Level 2 Topics
    L2 --> BS["Binary search"]:::topic
    L2 --> MATH2["Math"]:::topic
    L2 --> MITM["Meet in the middle"]:::topic
    L2 --> STL["STL"]:::topic
    L2 --> TP["Two pointers"]:::topic

    %% Level 3 Topics
    L3 --> BM["Bitmasks"]:::topic
    L3 --> DS["Data structure"]:::topic
    L3 --> DP["Dynamic Programming"]:::topic
    L3 --> GRAPH["Graph (BFS & DFS)"]:::topic
    L3 --> STRING["String (String matching - Hash)"]:::topic
    L3 --> TREE["Tree"]:::topic

    %% Level 4 Topics
    L4 --> MATH4["Math"]:::topic

    %% Level 3 - Bitmasks Problems
    BM --> RX["Range XOR"]:::problem
    BM --> XR["XORray"]:::problem

    %% Artifacts for "Range XOR"
    RX --> RX_v1["code_v1.cpp"]:::artifact
    RX --> RX_v2["code_v2_space_optimize.cpp"]:::artifact
    RX --> RX_desc["description.md"]:::artifact
    RX --> RX_eng["sol_English.md"]:::artifact
    RX --> RX_viet["sol_Vietnamese.md"]:::artifact

    %% Artifacts for "XORray"
    XR --> XR_code["code.cpp"]:::artifact
    XR --> XR_desc["description.md"]:::artifact
    XR --> XR_eng["sol_English.md"]:::artifact
    XR --> XR_viet["sol_Vietnamese.md"]:::artifact

    %% Level 3 - Data Structure Problems
    DS --> DSU["Disjoint Set Union (DSU)"]:::topic
    DSU --> YAP["Yet another problem"]:::problem

    %% Artifacts for "Yet another problem"
    YAP --> ya_v1["code_v1.cpp"]:::artifact
    YAP --> ya_v2["code_v2_space_optimize.cpp"]:::artifact
    YAP --> ya_desc["description.md"]:::artifact

    %% Level 3 - Dynamic Programming Problems
    DP --> IDP["Introduction to dynamic programming"]:::topic
    IDP --> K2["Knapsack 2"]:::problem

    %% Artifacts for "Knapsack 2"
    K2 --> k2_hehe["code_hehe.cpp"]:::artifact
    K2 --> k2_v1["code_v1.cpp"]:::artifact
    K2 --> k2_v2["code_v2.cpp"]:::artifact
    K2 --> k2_v3["code_v3.cpp"]:::artifact
    K2 --> k2_desc["description.md"]:::artifact
    K2 --> k2_eng["sol_English.md"]:::artifact
    K2 --> k2_viet["sol_Vietnamese.md"]:::artifact

    %% Click Events for Main Components
    click R "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/MarisaOJ-roadmap-solution"
    click RM "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap"

    %% Click Events for Level Folders
    click L0 "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/level 0"
    click L1 "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/level 1"
    click L2 "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/level 2"
    click L3 "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/Level 3"
    click L4 "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/Level 4"

    %% Click Events for Level 0 Topic
    click L0OP "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/level 0/Other problems"

    %% Click Events for Level 1 Topics
    click BT "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/level 1/Backtracking"
    click P "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/level 1/Permutation"
    click PS "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/level 1/Prefix sum"
    click S "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/level 1/Sorting"

    %% Click Events for Level 2 Topics
    click BS "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/level 2/Binary search"
    click MATH2 "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/level 2/Math"
    click MITM "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/level 2/Meet in the middle"
    click STL "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/level 2/STL"
    click TP "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/level 2/Two pointers"

    %% Click Events for Level 3 Topics
    click BM "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/Level 3/Bitmasks"
    click DS "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/Level 3/Data structure"
    click DP "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/Level 3/Dynamic Programming"
    click GRAPH "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/Level 3/Graph/BFS & DFS"
    click STRING "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/Level 3/String/String matching - Hash"
    click TREE "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/Level 3/Tree"

    %% Click Events for Level 4 Topic
    click MATH4 "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/Level 4/Math"

    %% Click Events for Problem Nodes and Their Artifacts
    click RX "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/Level 3/Bitmasks/Range XOR/"
    click XR "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/Level 3/Bitmasks/XORray/"
    click DSU "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/Level 3/Data structure/Disjoint Set Union (DSU)"
    click YAP "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/Level 3/Data structure/Disjoint Set Union (DSU)/Yet another problem/"
    click K2 "https://github.com/nxhhoang/marisaoj-roadmap-solution/tree/main/Roadmap/Level 3/Dynamic Programming/Introduction to dynamic programming/Knapsack 2/"

    click RX_v1 "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Bitmasks/Range XOR/code_v1.cpp"
    click RX_v2 "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Bitmasks/Range XOR/code_v2_space_optimize.cpp"
    click RX_desc "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Bitmasks/Range XOR/description.md"
    click RX_eng "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Bitmasks/Range XOR/sol_English.md"
    click RX_viet "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Bitmasks/Range XOR/sol_Vietnamese.md"

    click XR_code "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Bitmasks/XORray/code.cpp"
    click XR_desc "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Bitmasks/XORray/description.md"
    click XR_eng "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Bitmasks/XORray/sol_English.md"
    click XR_viet "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Bitmasks/XORray/sol_Vietnamese.md"

    click ya_v1 "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Data structure/Disjoint Set Union (DSU)/Yet another problem/code_v1.cpp"
    click ya_v2 "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Data structure/Disjoint Set Union (DSU)/Yet another problem/code_v2_space_optimize.cpp"
    click ya_desc "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Data structure/Disjoint Set Union (DSU)/Yet another problem/description.md"

    click k2_hehe "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Dynamic Programming/Introduction to dynamic programming/Knapsack 2/code_hehe.cpp"
    click k2_v1 "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Dynamic Programming/Introduction to dynamic programming/Knapsack 2/code_v1.cpp"
    click k2_v2 "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Dynamic Programming/Introduction to dynamic programming/Knapsack 2/code_v2.cpp"
    click k2_v3 "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Dynamic Programming/Introduction to dynamic programming/Knapsack 2/code_v3.cpp"
    click k2_desc "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Dynamic Programming/Introduction to dynamic programming/Knapsack 2/description.md"
    click k2_eng "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Dynamic Programming/Introduction to dynamic programming/Knapsack 2/sol_English.md"
    click k2_viet "https://github.com/nxhhoang/marisaoj-roadmap-solution/blob/main/Roadmap/Level 3/Dynamic Programming/Introduction to dynamic programming/Knapsack 2/sol_Vietnamese.md"

    %% Styles
    classDef repository fill:#f8f,stroke:#333,stroke-width:2px;
    classDef roadmap fill:#ccf,stroke:#333,stroke-width:2px;
    classDef level fill:#cfc,stroke:#333,stroke-width:2px;
    classDef topic fill:#fcf,stroke:#333,stroke-width:2px;
    classDef problem fill:#cff,stroke:#333,stroke-width:2px;
    classDef artifact fill:#ffc,stroke:#333,stroke-width:1px;
```
