# velkonost/leetcode architecture

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

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

## Overview

##### Project type and purpose
- This is not a web application or microservice ecosystem but a monolithic, file-based code repository (“leetcode”) containing hundreds of self-contained algorithm solutions.
- Each subdirectory is a standalone problem implementation (mostly in Kotlin, with a few SQL and one JavaScript solution).
- The purpose is purely educational/archival: store, document, and execute individual LeetCode solutions.

##### File structure
- Top level
- README.md (“# leetcode”)
- 400+ problem directories named “<number>-<title>”
- Inside each problem directory
- README.md – problem statement or notes
- A single source file (two-sum.kt, complement-of-base-10-integer.kt, etc.)
- No shared code libraries, build scripts, frameworks, or external service configurations exist.
- This structure follows a flat, directory-per-module modular pattern.

##### Insights from the README
- The repo README contains only a title and no architectural or dependency information.
- Each problem’s README may contain sample I/O or complexity notes but no “system” details.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Version Control"
        GH["GitHub Repo"]:::vc
        GH_Readme["README.md"]:::vc
    end

    subgraph "Local Clone"
        FS["Local File System"]:::vc
    end

    IDE["IDE / Editor"]:::tooling

    subgraph "Kotlin Problem Modules"
        TS["1-two-sum.kt"]:::code
        FN["1013-fibonacci-number.kt"]:::code
        SS["392-is-subsequence.kt"]:::code
    end

    subgraph "SQL Problem Modules"
        COMBINE["combine-two-tables.sql"]:::code
        EMP["employees-earning-more-than-their-managers.sql"]:::code
        DUP["duplicate-emails.sql"]:::code
        CUST["customers-who-never-order.sql"]:::code
    end

    subgraph "JS Problem Module"
        JS["check-if-object-instance-of-class.js"]:::code
    end

    JVM["JVM (Kotlin Runtime)"]:::tooling
    SQL["SQL Engine"]:::tooling
    Node["Node.js"]:::tooling

    GH -->|"git clone"| FS
    FS -->|"open in IDE"| IDE
    IDE -->|"compile/run Kotlin"| JVM
    IDE -->|"execute SQL scripts"| SQL
    IDE -->|"run JavaScript"| Node
    JVM -->|"output/test"| IDE
    SQL -->|"output/test"| IDE
    Node -->|"output/test"| IDE
    IDE -->|"git push"| GH

    click GH "https://github.com/velkonost/leetcode/tree/main//"
    click GH_Readme "https://github.com/velkonost/leetcode/blob/main//README.md"
    click FS "https://github.com/velkonost/leetcode/tree/main//"
    click TS "https://github.com/velkonost/leetcode/blob/main//1-two-sum/two-sum.kt"
    click FN "https://github.com/velkonost/leetcode/blob/main//1013-fibonacci-number/fibonacci-number.kt"
    click SS "https://github.com/velkonost/leetcode/blob/main//392-is-subsequence/is-subsequence.kt"
    click COMBINE "https://github.com/velkonost/leetcode/blob/main//175-combine-two-tables/combine-two-tables.sql"
    click EMP "https://github.com/velkonost/leetcode/blob/main//181-employees-earning-more-than-their-managers/employees-earning-more-than-their-managers.sql"
    click DUP "https://github.com/velkonost/leetcode/blob/main//182-duplicate-emails/duplicate-emails.sql"
    click CUST "https://github.com/velkonost/leetcode/blob/main//183-customers-who-never-order/customers-who-never-order.sql"
    click JS "https://github.com/velkonost/leetcode/blob/main//2758-check-if-object-instance-of-class/check-if-object-instance-of-class.js"

    classDef vc fill:#cce5ff,stroke:#004085,color:#004085
    classDef code fill:#d4edda,stroke:#155724,color:#155724
    classDef tooling fill:#fff3cd,stroke:#856404,color:#856404
```
