# surya-0804/dsa-journey architecture

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

- Interactive diagram: https://gitdiagram.com/surya-0804/dsa-journey
- Repository: https://github.com/surya-0804/dsa-journey

## Overview

##### Project Type and Purpose
- Type: An educational/utility code library of Data Structures & Algorithms (DSA) implementations and notes.
- Purpose: Organize and expose DSA theory, canonical implementations, and pattern-based problem collections for self-study or reuse.

##### File Structure
- Top-level components (modules):
– 0-Theory
– 1-Array
– 2-String
– 4-LinkedList
– 5-Stack&Queue
– 6-Trees
– Patterns
- Each numbered directory is a “problem-domain” module.
- “Patterns” re-groups algorithms by technique (Sliding Window, Binary Search, etc.), showing reuse across domains.
- Markdown files under each module serve as documentation/notes.

##### Main Components
a. Theory Module
– Contains foundational notes (complexity, Big-O, etc.).
b. Domain Modules
– Array, String, LinkedList, Stack&Queue, Trees
– Each holds Java code for domain-specific problems + README/notes.
c. Patterns Module
– Sub-modules for algorithmic strategies (01-SlidingWindow, 03-BinarySearch, …).
– Illustrates cross-cutting concerns: the same algorithm implemented in multiple domains.
d. Repository Root
– README.md, LICENSE, top-level overview.

##### Relationships and Interactions
(e.g., Patterns/3-BinarySearch ↔ 1-Array/BinarySearchProblem.java)
- Documentation flows: README.md at the root links into each module’s README.

##### Highlighted Architectural Principles
- Modular decomposition by problem domain.
- Cross-cutting abstraction via Patterns.
- Clear separation of code (Java) vs. documentation (Markdown).
- Reusability: Patterns modules centralize algorithmic logic, avoiding duplication.

##### Technologies & Artifacts
- Java source files (.java)
- Markdown documentation (.md)
- Git repository orchestration (README, LICENSE, folder structure)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Repository Root
    Root["Repository Root"]:::root

    %% Theory Module
    Theory["0-Theory"]:::theory

    %% Domain Modules
    subgraph "Domain Modules"
        direction TB
        Array["1-Array"]:::domain
        String["2-String"]:::domain
        LinkedList["4-LinkedList"]:::domain
        StackQueue["5-Stack&Queue"]:::domain
        Trees["6-Trees"]:::domain
    end

    %% Patterns Module
    subgraph "Patterns" 
        direction TB
        SlidingWindow["01-SlidingWindow"]:::patterns
        TwoPointers["01-TwoPointers"]:::patterns
        Kadane["2-Kadane"]:::patterns
        BinarySearch["3-BinarySearch"]:::patterns
        MergeSort["4-MergeSort"]:::patterns
        QuickSort["5-QuickSort"]:::patterns
        CountingSort["6-CountingSort"]:::patterns
        Hashing["7-Hashing"]:::patterns
    end

    %% Connections from Root
    Root -->|"contains"| Theory
    Root -->|"contains"| Array
    Root -->|"contains"| String
    Root -->|"contains"| LinkedList
    Root -->|"contains"| StackQueue
    Root -->|"contains"| Trees
    Root -->|"contains"| SlidingWindow
    Root -->|"contains"| TwoPointers
    Root -->|"contains"| Kadane
    Root -->|"contains"| BinarySearch
    Root -->|"contains"| MergeSort
    Root -->|"contains"| QuickSort
    Root -->|"contains"| CountingSort
    Root -->|"contains"| Hashing

    %% Theory dependencies
    Theory -->|"references"| Array
    Theory -->|"references"| String
    Theory -->|"references"| LinkedList
    Theory -->|"references"| StackQueue
    Theory -->|"references"| Trees
    Theory -->|"references"| SlidingWindow
    Theory -->|"references"| TwoPointers
    Theory -->|"references"| Kadane
    Theory -->|"references"| BinarySearch
    Theory -->|"references"| MergeSort
    Theory -->|"references"| QuickSort
    Theory -->|"references"| CountingSort
    Theory -->|"references"| Hashing

    %% Patterns to Domains
    SlidingWindow -->|"implements on"| Array
    SlidingWindow -->|"implements on"| String
    TwoPointers -->|"implements on"| Array
    TwoPointers -->|"implements on"| String
    Kadane -->|"implements on"| Array
    BinarySearch -->|"implements on"| Array
    BinarySearch -->|"implements on"| String
    MergeSort -->|"implements on"| Array
    QuickSort -->|"implements on"| Array
    CountingSort -->|"implements on"| Array
    Hashing -->|"implements on"| Array
    Hashing -->|"implements on"| String

    %% Click Events
    click Theory "https://github.com/surya-0804/dsa-journey/tree/main/0-Theory/"
    click Array "https://github.com/surya-0804/dsa-journey/tree/main/1-Array/"
    click String "https://github.com/surya-0804/dsa-journey/tree/main/2-String/"
    click LinkedList "https://github.com/surya-0804/dsa-journey/tree/main/4-LinkedList/"
    click StackQueue "https://github.com/surya-0804/dsa-journey/tree/main/5-Stack&Queue/"
    click Trees "https://github.com/surya-0804/dsa-journey/tree/main/6-Trees/"
    click SlidingWindow "https://github.com/surya-0804/dsa-journey/tree/main/Patterns/01-SlidingWindow/"
    click TwoPointers "https://github.com/surya-0804/dsa-journey/tree/main/Patterns/01-TwoPointers/"
    click Kadane "https://github.com/surya-0804/dsa-journey/tree/main/Patterns/2-Kadane/"
    click BinarySearch "https://github.com/surya-0804/dsa-journey/tree/main/Patterns/3-BinarySearch/"
    click MergeSort "https://github.com/surya-0804/dsa-journey/tree/main/Patterns/4-MergeSort/"
    click QuickSort "https://github.com/surya-0804/dsa-journey/tree/main/Patterns/5-QuickSort/"
    click CountingSort "https://github.com/surya-0804/dsa-journey/tree/main/Patterns/6-CountingSort/"
    click Hashing "https://github.com/surya-0804/dsa-journey/tree/main/Patterns/7-Hashing/"
    click Root "https://github.com/surya-0804/dsa-journey/blob/main/Readme.md"

    %% Styles
    classDef root fill:#eee,stroke:#333,stroke-width:2px
    classDef theory fill:#bbf,stroke:#333,stroke-width:1px
    classDef domain fill:#bfb,stroke:#333,stroke-width:1px
    classDef patterns fill:#fbb,stroke:#333,stroke-width:1px
```
