# dongyoun2/leetcode architecture

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

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

## Overview

##### Architectural Patterns and Design Principles
- Although this is not a large-scale software application, the repository illustrates modularization, where each problem solution is containerized in its own directory, allowing for easy navigation and potential scalability.
- That the project supports versioning through consistent naming conventions (the date stamps on the filenames) and that alternative solutions (e.g., “built_in” vs “naive” implementations) are provided.

## Diagram (Mermaid)

```mermaid
flowchart TD
    repo["LeetCode Repository"]:::repo

    repo --> p1048_dir
    subgraph "1048. Longest String Chain"
      direction TB
      p1048_dir["1048. Longest String Chain"]:::dir
      p1048_sol["Solution: 03_24_2025.py"]:::sol
      p1048_doc["Doc: optimal_dp.md"]:::doc
      p1048_dir --> p1048_sol
      p1048_dir --> p1048_doc
    end

    repo --> p15_dir
    subgraph "15. 3Sum"
      direction TB
      p15_dir["15. 3Sum"]:::dir
      p15_sol["Solution: 03_25_2025.py"]:::sol
      p15_doc["Local Doc: README.md"]:::doc
      p15_dir --> p15_sol
      p15_dir --> p15_doc
    end

    repo --> p125_dir
    subgraph "125. Valid Palindrome"
      direction TB
      p125_dir["125. Valid Palindrome"]:::dir
      p125_sol1["Solution: 03_21_2025_built_in.py"]:::sol
      p125_sol2["Solution: 03_21_2025_two_pointers.py"]:::sol
      p125_dir --> p125_sol1
      p125_dir --> p125_sol2
    end

    repo --> p162_dir
    subgraph "162. Find Peak Element"
      direction TB
      p162_dir["162. Find Peak Element"]:::dir
      p162_sol["Solution: 03_29_2025.py"]:::sol
      p162_doc["Local Doc: README.md"]:::doc
      p162_dir --> p162_sol
      p162_dir --> p162_doc
    end

    repo --> p215_dir
    subgraph "215. Kth Largest Element in an Array"
      direction TB
      p215_dir["215. Kth Largest Element in an Array"]:::dir
      p215_sol1["Solution: 03_29_2025_heap.py"]:::sol
      p215_sol2["Solution: 03_29_2025_sorting.py"]:::sol
      p215_dir --> p215_sol1
      p215_dir --> p215_sol2
    end

    repo --> p253_dir
    subgraph "253. Meeting Rooms II"
      direction TB
      p253_dir["253. Meeting Rooms II"]:::dir
      p253_sol["Solution: 03_25_2025.py"]:::sol
      p253_doc["Doc: min_heap.md"]:::doc
      p253_dir --> p253_sol
      p253_dir --> p253_doc
    end

    repo --> p28_dir
    subgraph "28. Find the Index of the First Occurrence in a String"
      direction TB
      p28_dir["28. Find the Index of the First Occurrence in a String"]:::dir
      p28_sol1["Solution: 03_20_2025_built_in.py"]:::sol
      p28_sol2["Solution: 03_20_2025_naive.py"]:::sol
      p28_doc["Doc: kmp_algoritm.md"]:::doc
      p28_dir --> p28_sol1
      p28_dir --> p28_sol2
      p28_dir --> p28_doc
    end

    repo --> p373_dir
    subgraph "373. Find K Pairs with Smallest Sums"
      direction TB
      p373_dir["373. Find K Pairs with Smallest Sums"]:::dir
      p373_sol1["Solution: 03_29_2025_naive.py"]:::sol
      p373_sol2["Solution: 03_29_2025_wrong.py"]:::sol
      p373_doc["Local Doc: README.md"]:::doc
      p373_dir --> p373_sol1
      p373_dir --> p373_sol2
      p373_dir --> p373_doc
    end

    repo --> p392_dir
    subgraph "392. Is Subsequence"
      direction TB
      p392_dir["392. Is Subsequence"]:::dir
      p392_sol["Solution: 03_22_2025.py"]:::sol
      p392_doc["Doc: follow_up.md"]:::doc
      p392_dir --> p392_sol
      p392_dir --> p392_doc
    end

    repo --> p5_dir
    subgraph "5. Longest Palindromic Substring"
      direction TB
      p5_dir["5. Longest Palindromic Substring"]:::dir
      p5_sol["Solution: 03_31_2025.py"]:::sol
      p5_doc["Doc: expand_from_center.md"]:::doc
      p5_dir --> p5_sol
      p5_dir --> p5_doc
    end

    repo --> p54_dir
    subgraph "54. Spiral Matrix"
      direction TB
      p54_dir["54. Spiral Matrix"]:::dir
      p54_sol["Solution: 03_28_2025.py"]:::sol
      p54_doc["Doc: iterative_approach.md"]:::doc
      p54_dir --> p54_sol
      p54_dir --> p54_doc
    end

    repo --> p773_dir
    subgraph "773. Sliding Puzzle"
      direction TB
      p773_dir["773. Sliding Puzzle"]:::dir
      p773_sol["Solution: 03_26_2025.py"]:::sol
      p773_doc["Local Doc: README.md"]:::doc
      p773_dir --> p773_sol
      p773_dir --> p773_doc
    end

    repo --> p97_dir
    subgraph "97. Interleaving String"
      direction TB
      p97_dir["97. Interleaving String"]:::dir
      p97_sol["Solution: 04_01_2025.py"]:::sol
      p97_doc["Local Doc: README.md"]:::doc
      p97_dir --> p97_sol
      p97_dir --> p97_doc
    end

    %% Click Events
    click repo "https://github.com/dongyoun2/leetcode/blob/main/README.md"
    click p1048_dir "https://github.com/dongyoun2/leetcode/blob/main/1048. Longest String Chain"
    click p1048_sol "https://github.com/dongyoun2/leetcode/blob/main/1048. Longest String Chain/03_24_2025.py"
    click p1048_doc "https://github.com/dongyoun2/leetcode/blob/main/1048. Longest String Chain/optimal_dp.md"

    click p15_dir "https://github.com/dongyoun2/leetcode/blob/main/15. 3Sum"
    click p15_sol "https://github.com/dongyoun2/leetcode/blob/main/15. 3Sum/03_25_2025.py"
    click p15_doc "https://github.com/dongyoun2/leetcode/blob/main/15. 3Sum/README.md"

    click p125_dir "https://github.com/dongyoun2/leetcode/blob/main/125. Valid Palindrome"
    click p125_sol1 "https://github.com/dongyoun2/leetcode/blob/main/125. Valid Palindrome/03_21_2025_built_in.py"
    click p125_sol2 "https://github.com/dongyoun2/leetcode/blob/main/125. Valid Palindrome/03_21_2025_two_pointers.py"

    click p162_dir "https://github.com/dongyoun2/leetcode/blob/main/162. Find Peak Element"
    click p162_sol "https://github.com/dongyoun2/leetcode/blob/main/162. Find Peak Element/03_29_2025.py"
    click p162_doc "https://github.com/dongyoun2/leetcode/blob/main/162. Find Peak Element/README.md"

    click p215_dir "https://github.com/dongyoun2/leetcode/blob/main/215. Kth Largest Element in an Array"
    click p215_sol1 "https://github.com/dongyoun2/leetcode/blob/main/215. Kth Largest Element in an Array/03_29_2025_heap.py"
    click p215_sol2 "https://github.com/dongyoun2/leetcode/blob/main/215. Kth Largest Element in an Array/03_29_2025_sorting.py"

    click p253_dir "https://github.com/dongyoun2/leetcode/blob/main/253. Meeting Rooms II"
    click p253_sol "https://github.com/dongyoun2/leetcode/blob/main/253. Meeting Rooms II/03_25_2025.py"
    click p253_doc "https://github.com/dongyoun2/leetcode/blob/main/253. Meeting Rooms II/min_heap.md"

    click p28_dir "https://github.com/dongyoun2/leetcode/blob/main/28. Find the Index of the First Occurrence in a String"
    click p28_sol1 "https://github.com/dongyoun2/leetcode/blob/main/28. Find the Index of the First Occurrence in a String/03_20_2025_built_in.py"
    click p28_sol2 "https://github.com/dongyoun2/leetcode/blob/main/28. Find the Index of the First Occurrence in a String/03_20_2025_naive.py"
    click p28_doc "https://github.com/dongyoun2/leetcode/blob/main/28. Find the Index of the First Occurrence in a String/kmp_algoritm.md"

    click p373_dir "https://github.com/dongyoun2/leetcode/blob/main/373. Find K Pairs with Smallest Sums"
    click p373_sol1 "https://github.com/dongyoun2/leetcode/blob/main/373. Find K Pairs with Smallest Sums/03_29_2025_naive.py"
    click p373_sol2 "https://github.com/dongyoun2/leetcode/blob/main/373. Find K Pairs with Smallest Sums/03_29_2025_wrong.py"
    click p373_doc "https://github.com/dongyoun2/leetcode/blob/main/373. Find K Pairs with Smallest Sums/README.md"

    click p392_dir "https://github.com/dongyoun2/leetcode/blob/main/392. Is Subsequence"
    click p392_sol "https://github.com/dongyoun2/leetcode/blob/main/392. Is Subsequence/03_22_2025.py"
    click p392_doc "https://github.com/dongyoun2/leetcode/blob/main/392. Is Subsequence/follow_up.md"

    click p5_dir "https://github.com/dongyoun2/leetcode/blob/main/5. Longest Palindromic Substring"
    click p5_sol "https://github.com/dongyoun2/leetcode/blob/main/5. Longest Palindromic Substring/03_31_2025.py"
    click p5_doc "https://github.com/dongyoun2/leetcode/blob/main/5. Longest Palindromic Substring/expand_from_center.md"

    click p54_dir "https://github.com/dongyoun2/leetcode/blob/main/54. Spiral Matrix"
    click p54_sol "https://github.com/dongyoun2/leetcode/blob/main/54. Spiral Matrix/03_28_2025.py"
    click p54_doc "https://github.com/dongyoun2/leetcode/blob/main/54. Spiral Matrix/iterative_approach.md"

    click p773_dir "https://github.com/dongyoun2/leetcode/blob/main/773. Sliding Puzzle"
    click p773_sol "https://github.com/dongyoun2/leetcode/blob/main/773. Sliding Puzzle/03_26_2025.py"
    click p773_doc "https://github.com/dongyoun2/leetcode/blob/main/773. Sliding Puzzle/README.md"

    click p97_dir "https://github.com/dongyoun2/leetcode/blob/main/97. Interleaving String"
    click p97_sol "https://github.com/dongyoun2/leetcode/blob/main/97. Interleaving String/04_01_2025.py"
    click p97_doc "https://github.com/dongyoun2/leetcode/blob/main/97. Interleaving String/README.md"

    %% Styles
    classDef repo fill:#e0f7fa,stroke:#006064,stroke-width:2px;
    classDef dir fill:#bbdefb,stroke:#0d47a1,stroke-width:2px;
    classDef sol fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px;
    classDef doc fill:#ffe0b2,stroke:#ef6c00,stroke-width:2px;
```
