# prathamdby/leetcode architecture

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

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

## Overview

##### Project Type Analysis
This is a code repository specifically focused on storing LeetCode problem solutions implemented in Java. The structure follows a problem-based organization where each solution is contained in its own directory.

##### Main Components

A. Repository Root Level
- Main container representing the entire repository
- LICENSE and README.md at this level

B. Problem Categories Layer
- Problems by their types (e.g., Arrays, Strings, Hash Tables)

C. Individual Problem Layer
- Standard structure for each problem:
- Problem Directory
- Solution File (.java)
- Problem README

##### Specific Implementation Details

- Use a consistent template showing:
- Problem Number (e.g., 0001)
- Problem Name (e.g., two-sum)
- Solution File
- README file

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Root["Repository Root"]
        README["README.md"]
        LICENSE["LICENSE"]
        GITIGNORE[".gitignore"]
    end

    subgraph Problems["LeetCode Problems"]
        direction TB
        subgraph Arrays["Array Problems"]
            direction TB
            P1["0001: Two Sum"]
            P7["1929: Concatenation of Array"]
        end

        subgraph Strings["String Problems"]
            direction TB
            P2["0014: Longest Common Prefix"]
        end

        subgraph HashTable["Hash Table Problems"]
            direction TB
            P3["0049: Group Anagrams"]
            P5["0217: Contains Duplicate"]
            P6["0242: Valid Anagram"]
        end
    end

    %% Problem Structure Details
    subgraph P1_Detail["Two Sum Structure"]
        P1_DIR["Problem Directory"]
        P1_SOLUTION["Solution.java"]
        P1_README["README.md"]
    end

    %% Relationships
    Root --> Problems
    P1 --> P1_Detail

    %% Style Definitions
    classDef default fill:#f9f9f9,stroke:#333,stroke-width:1px
    classDef root fill:#e1f5fe,stroke:#01579b
    classDef problem fill:#e8f5e9,stroke:#2e7d32
    classDef file fill:#fff3e0,stroke:#ef6c00
    classDef category fill:#f3e5f5,stroke:#4a148c

    %% Apply Styles
    class Root,README,LICENSE,GITIGNORE root
    class P1,P2,P3,P5,P6,P7 problem
    class P1_SOLUTION,P1_README file
    class Arrays,Strings,HashTable category

    %% Click Events
    click README "https://github.com/prathamdby/leetcode/blob/main/README.md"
    click LICENSE "https://github.com/prathamdby/leetcode/tree/main/LICENSE"
    click GITIGNORE "https://github.com/prathamdby/leetcode/blob/main/.gitignore"
    
    click P1 "https://github.com/prathamdby/leetcode/tree/main/0001-two-sum"
    click P2 "https://github.com/prathamdby/leetcode/tree/main/0014-longest-common-prefix"
    click P3 "https://github.com/prathamdby/leetcode/tree/main/0049-group-anagrams"
    click P5 "https://github.com/prathamdby/leetcode/tree/main/0217-contains-duplicate"
    click P6 "https://github.com/prathamdby/leetcode/tree/main/0242-valid-anagram"
    click P7 "https://github.com/prathamdby/leetcode/tree/main/1929-concatenation-of-array"
    
    click P1_SOLUTION "https://github.com/prathamdby/leetcode/blob/main/0001-two-sum/0001-two-sum.java"
    click P1_README "https://github.com/prathamdby/leetcode/blob/main/0001-two-sum/README.md"

    %% Legend
    subgraph Legend
        L1[Repository Files]:::root
        L2[Problem]:::problem
        L3[Solution Files]:::file
        L4[Problem Category]:::category
    end
```
