# mohsenbg/cobradecision architecture

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

- Interactive diagram: https://gitdiagram.com/mohsenbg/cobradecision
- Repository: https://github.com/mohsenbg/cobradecision

## Overview

##### Project Type and Purpose
- The repository is a collaborative, multi-participant repository focused on solving algorithmic questions (e.g., Jump Game, Remove Duplicates, Two Sum, etc.).
- Its purpose is to allow different contributors to work independently by using separate branches and folders under their names while collectively solving and sharing answers to given problem statements.
- The README outlines the contribution process and lists the questions, indicating a learning, competitive, or practice setup that supports multiple languages and implementations.

##### Key Components and Their Locations
a. Repository Organization:
- At the top-level, you have the issue tracker, branches, and separate directories for each participant (e.g., Ali, Awmir, MohsenBg, Rezishon, Shayan).
- The “Questions” directory holds markdown files that present the problem statements.
b. Implementations by Contributors:
- Solutions are implemented in various languages such as C#, Rust, Zig, Assembly, Golang, Python, TypeScript, etc., which demonstrates a polyglot approach where several technology stacks are used.
c. CI/CD and Testing:
- The “.github/workflows” directory contains multiple GitHub Action workflows that automatically run tests for different problems (e.g., jump_game test, two sum test, etc.). This ensures that automated testing/validation is integrated into the repository.
d. Language/Tool Specific Directories:
- Within each contributor’s folder, especially under MohsenBg and Rezishon, there are project directories with language-specific build configurations (e.g., Cargo for Rust, Zig build files, go.mod for Golang). This indicates that each language’s build and run configurations are maintained as a part of the solution.

## Diagram (Mermaid)

```mermaid
flowchart TD
    CR("Central Repository Management"):::central

    subgraph "Contributors"
        Ali("Contributor: Ali"):::contributor
        Awmir("Contributor: Awmir"):::contributor
        MohsenBg("Contributor: MohsenBg"):::contributor
        Rezishon("Contributor: Rezishon"):::contributor
        Shayan("Contributor: Shayan"):::contributor
    end

    Problems("Problem Modules (Questions)"):::problem
    CICD("CI/CD Pipeline"):::cicd

    subgraph "Build Systems"
        RustBuild("Rust Build (MohsenBg)"):::build
        ZigBuild("Zig Build (MohsenBg)"):::build
        AsmJump("Assembly Build (Jump Game)"):::build
        AsmTwoSum("Assembly Build (Two Sum Sorted)"):::build
        GolangBuild("Golang Build (Rezishon)"):::build
        TSTBuild("TypeScript Build (Rezishon)"):::build
    end

    %% Connections from Central Repository to Contributors, Problems and CI/CD Pipeline
    CR --> Ali
    CR --> Awmir
    CR --> MohsenBg
    CR --> Rezishon
    CR --> Shayan
    CR --> Problems
    CR --> CICD

    %% Contributors contribute to solving problems
    Ali --> Problems
    Awmir --> Problems
    MohsenBg --> Problems
    Rezishon --> Problems
    Shayan --> Problems

    %% Contributors trigger CI/CD pipeline
    Ali --> CICD
    Awmir --> CICD
    MohsenBg --> CICD
    Rezishon --> CICD
    Shayan --> CICD

    %% Specific language build systems linked from contributors
    MohsenBg --> RustBuild
    MohsenBg --> ZigBuild
    MohsenBg --> AsmJump
    MohsenBg --> AsmTwoSum
    Rezishon --> GolangBuild
    Rezishon --> TSTBuild

    %% Click Events for Component Mapping
    click Ali "https://github.com/mohsenbg/cobradecision/tree/main/Ali/"
    click Awmir "https://github.com/mohsenbg/cobradecision/tree/main/Awmir/"
    click MohsenBg "https://github.com/mohsenbg/cobradecision/tree/main/MohsenBg/"
    click Rezishon "https://github.com/mohsenbg/cobradecision/tree/main/Rezishon/"
    click Shayan "https://github.com/mohsenbg/cobradecision/tree/main/Shayan/"
    click Problems "https://github.com/mohsenbg/cobradecision/tree/main/Questions/"
    click CICD "https://github.com/mohsenbg/cobradecision/tree/main/.github/workflows/"
    click RustBuild "https://github.com/mohsenbg/cobradecision/tree/main/MohsenBg/jump_game/rust/"
    click ZigBuild "https://github.com/mohsenbg/cobradecision/tree/main/MohsenBg/two_sum/"
    click AsmJump "https://github.com/mohsenbg/cobradecision/tree/main/MohsenBg/jump_game/assembly/"
    click AsmTwoSum "https://github.com/mohsenbg/cobradecision/tree/main/MohsenBg/two_sum_sorted/assembly/"
    click GolangBuild "https://github.com/mohsenbg/cobradecision/tree/main/Rezishon/GolangProjs/"
    click TSTBuild "https://github.com/mohsenbg/cobradecision/tree/main/Rezishon/TypescriptProjs/TwoSum"

    %% Styles
    classDef central fill:#cccccc,stroke:#000,stroke-width:2px;
    classDef contributor fill:#AED6F1,stroke:#000,stroke-width:1px;
    classDef problem fill:#A9DFBF,stroke:#000,stroke-width:1px;
    classDef cicd fill:#F9E79F,stroke:#000,stroke-width:1px;
    classDef build fill:#D7BDE2,stroke:#000,stroke-width:1px;
```
