# louisjhuang/leetcode architecture

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

- Interactive diagram: https://gitdiagram.com/louisjhuang/leetcode
- Repository: https://github.com/louisjhuang/leetcode

## Overview

##### Main Components

a) Core Components:
- Problem Solution Modules (segregated by difficulty)
- Test Modules
- Spring Boot Application Core

b) Package Structure:
- Easy Problems Package
- Medium Problems Package
- Test Cases Organization

**┌─ Spring Boot Application Layer**
- LeetCodeApplication (Entry Point)

**┌─ Easy Problems**
- Medium Problems

**┌─ Solution Implementations**
- Test Cases

##### Specific Implementation Details

a) Main Application Flow:
- LeetCodeApplication
- ↓
- Problem Categories
- ↓
- Individual Solutions
- ↔
- Test Cases

b) Package Structure:
- com.leetcode
- easy
- TwoSum
- medium
- RotateArray

##### Technical Stack Indicators

A separate section showing:
- JDK 17
- Spring 6.2.0
- Spring Boot 3.4.0

##### Testing Framework Integration

Relationship between:
- Solution classes (e.g., TwoSum.java)
- Corresponding test classes (e.g., TwoSumTest.java)

Remember to:
- Testing relationship for each solution
- Version information in a reference section
- Notes about the project's purpose as a LeetCode solution repository

## Diagram (Mermaid)

```mermaid
graph TB
    %% Main Application
    subgraph Application
        LCA["LeetCodeApplication"]
        AP["Application Properties"]
        LAT["LeetCodeApplicationTests"]
    end

    %% Problem Categories
    subgraph ProblemCategories
        EP["Easy Problems"]:::easy
        MP["Medium Problems"]:::medium
    end

    %% Easy Problems Implementation
    subgraph EasyImplementation
        TS["TwoSum"]:::easy
        TST["TwoSum Tests"]:::test
    end

    %% Medium Problems Implementation
    subgraph MediumImplementation
        RA["RotateArray"]:::medium
        RAT["RotateArray Tests"]:::test
    end

    %% Technical Stack
    subgraph TechStack
        direction TB
        JDK["JDK 17"]
        SB["Spring Boot 3.4.0"]
        SF["Spring 6.2.0"]
    end

    %% Relationships
    LCA --> EP
    LCA --> MP
    EP --> TS
    MP --> RA
    TS <--> TST
    RA <--> RAT
    LAT --> LCA

    %% Styling
    classDef easy fill:#90EE90
    classDef medium fill:#FFD700
    classDef test fill:#DDA0DD
    classDef spring fill:#87CEEB

    %% Legend
    subgraph Legend
        L1["Easy Problems"]:::easy
        L2["Medium Problems"]:::medium
        L3["Test Components"]:::test
        L4["Spring Components"]:::spring
    end

    %% Click Events
    click LCA "https://github.com/LouisJhuang/LeetCode/blob/master/src/main/java/com/leetcode/LeetCodeApplication.java"
    click LAT "https://github.com/LouisJhuang/LeetCode/blob/master/src/test/java/com/leetcode/LeetCodeApplicationTests.java"
    click EP "https://github.com/LouisJhuang/LeetCode/tree/master/src/main/java/com/leetcode/easy/"
    click MP "https://github.com/LouisJhuang/LeetCode/tree/master/src/main/java/com/leetcode/medium/"
    click TS "https://github.com/LouisJhuang/LeetCode/blob/master/src/main/java/com/leetcode/easy/TwoSum.java"
    click RA "https://github.com/LouisJhuang/LeetCode/blob/master/src/main/java/com/leetcode/medium/RotateArray.java"
    click TST "https://github.com/LouisJhuang/LeetCode/blob/master/src/test/java/com/leetcode/easy/TwoSumTest.java"
    click RAT "https://github.com/LouisJhuang/LeetCode/blob/master/src/test/java/com/leetcode/medium/RotateArrayTest.java"
    click AP "https://github.com/LouisJhuang/LeetCode/blob/master/src/main/resources/application.properties"
```
