# chrzhang/abc architecture

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

- Interactive diagram: https://gitdiagram.com/chrzhang/abc
- Repository: https://github.com/chrzhang/abc

## Overview

##### Main Components Organization

a. Problem Categories (Main Domains):
- Arrays & Strings
- Data Structures (Trees, Heaps, Stacks, Queues, LinkedLists)
- Algorithms (Searches, Sorts, Dynamic Programming)
- Mathematics & Numbers
- Problem Sets (LeetCode, UVA, Advent of Code)
- Language-Specific Implementations (C++, Python, Haskell, Lua, Go)

##### Component Relationships
Use the following visual elements:
- Blue: Data Structures
- Green: Algorithms
- Orange: Problem Sets
- Purple: Language Implementations
- Gray: Utility/Misc Components

- Connection types:

- [Problem Categories] -- [Language Implementations] -- [Problem Sets]

- [Arrays] [Strings] [Trees] [Graphs] -- [C++] [Python] [Haskell] -- [LeetCode] [UVA] [AOC]

- [Problem1] [Problem2] [Problem3] ...

##### Implementation Details
- Build system (Makefiles)
- Input/Output handling
- Common utilities
- Testing frameworks

##### Cross-cutting Concerns
Shared components:
- Common algorithms
- Utility functions
- Testing frameworks
- Build systems

- Data          |  |  Algorithm    |  |  Problem       |
- Structures    |  |  Categories   |  |  Sets          |

- Language      |  |  Build        |  |  Testing       |
- Implementations|  |  Systems      |  |  Framework    |

##### Additional Elements
- Version control integration
- Build/test automation
- Difficulty levels
- Implementation status

- Hierarchical layouts
- Multiple connection types
- Text annotations
- Export to various formats

Remember to maintain a balance between detail and clarity, focusing on the architectural relationships while avoiding overwhelming detail at the implementation level.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Main
        PC[Problem Categories]
        LI[Language Implementations]
        PS[Problem Sets]
    end

    subgraph "Data Structures"
        DS[Data Structures]:::datastructures
        Trees[Trees]:::datastructures
        Heaps[Heaps]:::datastructures
        Stacks[Stacks]:::datastructures
        Queues[Queues]:::datastructures
        LinkedLists[Linked Lists]:::datastructures
        Tries[Tries]:::datastructures
    end

    subgraph "Core Categories"
        AS[Arrays & Strings]:::core
        Arrays[Arrays]:::core
        Strings[Strings]:::core
        Matrices[Matrices]:::core
        RegEx[Regular Expressions]:::core
    end

    subgraph "Algorithms"
        Algo[Algorithms]:::algorithms
        Searches[Searches]:::algorithms
        Sorts[Sorts]:::algorithms
        DP[Dynamic Programming]:::algorithms
        Recursion[Recursion]:::algorithms
    end

    subgraph "Mathematics"
        Math[Mathematics]:::math
        Numbers[Numbers & Digits]:::math
    end

    subgraph "Languages"
        Lua[Lua]:::language
        Go[Go]:::language
        Haskell[Haskell]:::language
    end

    subgraph "Problem Sets"
        LeetCode[LeetCode]:::problems
        UVA[UVA]:::problems
        AOC[Advent of Code]:::problems
        CP[Competitive Programming]:::problems
    end

    %% Relationships
    PC --> DS
    PC --> AS
    PC --> Algo
    PC --> Math

    DS --> Trees
    DS --> Heaps
    DS --> Stacks
    DS --> Queues
    DS --> LinkedLists
    DS --> Tries

    AS --> Arrays
    AS --> Strings
    AS --> Matrices
    AS --> RegEx

    Algo --> Searches
    Algo --> Sorts
    Algo --> DP
    Algo --> Recursion

    Math --> Numbers

    LI --> Lua
    LI --> Go
    LI --> Haskell

    PS --> LeetCode
    PS --> UVA
    PS --> AOC
    PS --> CP

    %% Click Events
    click Trees "https://github.com/chrzhang/abc/tree/master/trees/"
    click Heaps "https://github.com/chrzhang/abc/tree/master/heaps/"
    click Stacks "https://github.com/chrzhang/abc/tree/master/stacks/"
    click Queues "https://github.com/chrzhang/abc/tree/master/queues/"
    click LinkedLists "https://github.com/chrzhang/abc/tree/master/linkedLists/"
    click Tries "https://github.com/chrzhang/abc/tree/master/tries/"
    click Arrays "https://github.com/chrzhang/abc/tree/master/arrays/"
    click Strings "https://github.com/chrzhang/abc/tree/master/strings/"
    click Matrices "https://github.com/chrzhang/abc/tree/master/matrices/"
    click RegEx "https://github.com/chrzhang/abc/tree/master/regexes/"
    click Searches "https://github.com/chrzhang/abc/tree/master/searches/"
    click Sorts "https://github.com/chrzhang/abc/tree/master/sorts/"
    click DP "https://github.com/chrzhang/abc/tree/master/dynamic_programming/"
    click Recursion "https://github.com/chrzhang/abc/tree/master/recursion/"
    click Numbers "https://github.com/chrzhang/abc/tree/master/digits/"
    click Math "https://github.com/chrzhang/abc/tree/master/maths/"
    click Lua "https://github.com/chrzhang/abc/tree/master/lua/"
    click Go "https://github.com/chrzhang/abc/tree/master/golang/"
    click Haskell "https://github.com/chrzhang/abc/tree/master/haskell/"
    click LeetCode "https://github.com/chrzhang/abc/tree/master/leetcode/"
    click UVA "https://github.com/chrzhang/abc/tree/master/uva/"
    click AOC "https://github.com/chrzhang/abc/tree/master/adventOfCode/"
    click CP "https://github.com/chrzhang/abc/tree/master/competitive_programming/"

    %% Styles
    classDef datastructures fill:#2196F3,stroke:#1565C0,color:white
    classDef core fill:#4CAF50,stroke:#2E7D32,color:white
    classDef algorithms fill:#FF9800,stroke:#EF6C00,color:white
    classDef math fill:#9C27B0,stroke:#6A1B9A,color:white
    classDef language fill:#607D8B,stroke:#37474F,color:white
    classDef problems fill:#F44336,stroke:#C62828,color:white
```
