# imganpat/cracking-leetcode architecture

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

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

## Overview

This repository is a collection of independent LeetCode solutions, mainly in Java with a few JavaScript entries—not a single application with a shared runtime. The user-facing workflow is to choose a problem, run its standalone solution with the platform-provided inputs, and receive the computed answer. The README organizes problems by topic; the groups below reflect those distinct solution areas. The sampled files show individual algorithms, not a shared dispatcher, so links from the initiating user are dashed to indicate the general, unverified invocation pattern.

Main entry points: [`0033-search-in-rotated-sorted-array`](https://github.com/imganpat/cracking-leetcode/tree/main/0033-search-in-rotated-sorted-array) (Array and search solutions), [`0643-maximum-average-subarray-i`](https://github.com/imganpat/cracking-leetcode/tree/main/0643-maximum-average-subarray-i) (Window and range solutions), [`1792-maximum-average-pass-ratio`](https://github.com/imganpat/cracking-leetcode/tree/main/1792-maximum-average-pass-ratio) (Heap and greedy solutions), [`0303-range-sum-query-immutable`](https://github.com/imganpat/cracking-leetcode/tree/main/0303-range-sum-query-immutable) (Prefix sum solutions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_arrays["Arrays and search"]
  node_array_search["Array and search solutions"]
  node_array_windows["Window and range solutions"]
  node_array_heap["Heap and greedy solutions"]
  node_array_prefix["Prefix sum solutions"]
end

subgraph group_strings["Strings and combinations"]
  node_string_window["String window solutions"]
  node_string_combine["String and combination solutions"]
end

subgraph group_trees["Trees and lists"]
  node_tree_traversal["Tree traversal solutions"]
  node_tree_bst["BST solutions"]
  node_tree_aggregate["Tree aggregation solutions"]
  node_tree_list["Linked-list solutions"]
end

subgraph group_graphs["Graphs and grids"]
  node_graph_schedule["Course scheduling solutions"]
  node_graph_paths["Graph path solutions"]
  node_grid_search["Grid traversal solutions"]
end

subgraph group_dp["Dynamic programming"]
  node_dp_sequences["Sequence DP solutions"]
  node_dp_planning["Planning DP solutions"]
  node_dp_counting["Counting DP solutions"]
end

node_user(("Problem solver"))

node_user -.->|"selects and runs"| node_array_search
node_user -.->|"selects and runs"| node_array_windows
node_user -.->|"selects and runs"| node_array_heap
node_user -.->|"selects and runs"| node_array_prefix
node_user -.->|"selects and runs"| node_string_window
node_user -.->|"selects and runs"| node_string_combine
node_user -.->|"selects and runs"| node_tree_traversal
node_user -.->|"selects and runs"| node_tree_bst
node_user -.->|"selects and runs"| node_tree_aggregate
node_user -.->|"selects and runs"| node_tree_list
node_user -.->|"selects and runs"| node_graph_schedule
node_user -.->|"selects and runs"| node_graph_paths
node_user -.->|"selects and runs"| node_grid_search
node_user -.->|"selects and runs"| node_dp_sequences
node_user -.->|"selects and runs"| node_dp_planning
node_user -.->|"selects and runs"| node_dp_counting

click node_array_search "https://github.com/imganpat/cracking-leetcode/tree/main/0033-search-in-rotated-sorted-array"
click node_array_windows "https://github.com/imganpat/cracking-leetcode/tree/main/0643-maximum-average-subarray-i"
click node_array_heap "https://github.com/imganpat/cracking-leetcode/tree/main/1792-maximum-average-pass-ratio"
click node_array_prefix "https://github.com/imganpat/cracking-leetcode/tree/main/0303-range-sum-query-immutable"
click node_string_window "https://github.com/imganpat/cracking-leetcode/tree/main/0076-minimum-window-substring"
click node_string_combine "https://github.com/imganpat/cracking-leetcode/tree/main/0017-letter-combinations-of-a-phone-number"
click node_tree_traversal "https://github.com/imganpat/cracking-leetcode/tree/main/0637-average-of-levels-in-binary-tree"
click node_tree_bst "https://github.com/imganpat/cracking-leetcode/tree/main/0099-recover-binary-search-tree"
click node_tree_aggregate "https://github.com/imganpat/cracking-leetcode/tree/main/2265-count-nodes-equal-to-average-of-subtree"
click node_tree_list "https://github.com/imganpat/cracking-leetcode/tree/main/0002-add-two-numbers"
click node_graph_schedule "https://github.com/imganpat/cracking-leetcode/tree/main/0207-course-schedule"
click node_graph_paths "https://github.com/imganpat/cracking-leetcode/tree/main/0743-network-delay-time"
click node_grid_search "https://github.com/imganpat/cracking-leetcode/tree/main/0200-number-of-islands"
click node_dp_sequences "https://github.com/imganpat/cracking-leetcode/tree/main/0300-longest-increasing-subsequence"
click node_dp_planning "https://github.com/imganpat/cracking-leetcode/tree/main/0198-house-robber"
click node_dp_counting "https://github.com/imganpat/cracking-leetcode/tree/main/0096-unique-binary-search-trees"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_array_search,node_array_windows,node_array_heap,node_array_prefix toneBlue
class node_string_window,node_string_combine toneAmber
class node_tree_traversal,node_tree_bst,node_tree_aggregate,node_tree_list toneMint
class node_graph_schedule,node_graph_paths,node_grid_search toneRose
class node_dp_sequences,node_dp_planning,node_dp_counting,node_user toneIndigo
```

## Components

### Arrays and search

- [Array and search solutions](https://github.com/imganpat/cracking-leetcode/tree/main/0033-search-in-rotated-sorted-array): `0033-search-in-rotated-sorted-array`
- [Window and range solutions](https://github.com/imganpat/cracking-leetcode/tree/main/0643-maximum-average-subarray-i): `0643-maximum-average-subarray-i`
- [Heap and greedy solutions](https://github.com/imganpat/cracking-leetcode/tree/main/1792-maximum-average-pass-ratio): `1792-maximum-average-pass-ratio`
- [Prefix sum solutions](https://github.com/imganpat/cracking-leetcode/tree/main/0303-range-sum-query-immutable): `0303-range-sum-query-immutable`

### Strings and combinations

- [String window solutions](https://github.com/imganpat/cracking-leetcode/tree/main/0076-minimum-window-substring): `0076-minimum-window-substring`
- [String and combination solutions](https://github.com/imganpat/cracking-leetcode/tree/main/0017-letter-combinations-of-a-phone-number): `0017-letter-combinations-of-a-phone-number`

### Trees and lists

- [Tree traversal solutions](https://github.com/imganpat/cracking-leetcode/tree/main/0637-average-of-levels-in-binary-tree): `0637-average-of-levels-in-binary-tree`
- [BST solutions](https://github.com/imganpat/cracking-leetcode/tree/main/0099-recover-binary-search-tree): `0099-recover-binary-search-tree`
- [Tree aggregation solutions](https://github.com/imganpat/cracking-leetcode/tree/main/2265-count-nodes-equal-to-average-of-subtree): `2265-count-nodes-equal-to-average-of-subtree`
- [Linked-list solutions](https://github.com/imganpat/cracking-leetcode/tree/main/0002-add-two-numbers): `0002-add-two-numbers`

### Graphs and grids

- [Course scheduling solutions](https://github.com/imganpat/cracking-leetcode/tree/main/0207-course-schedule): `0207-course-schedule`
- [Graph path solutions](https://github.com/imganpat/cracking-leetcode/tree/main/0743-network-delay-time): `0743-network-delay-time`
- [Grid traversal solutions](https://github.com/imganpat/cracking-leetcode/tree/main/0200-number-of-islands): `0200-number-of-islands`

### Dynamic programming

- [Sequence DP solutions](https://github.com/imganpat/cracking-leetcode/tree/main/0300-longest-increasing-subsequence): `0300-longest-increasing-subsequence`
- [Planning DP solutions](https://github.com/imganpat/cracking-leetcode/tree/main/0198-house-robber): `0198-house-robber`
- [Counting DP solutions](https://github.com/imganpat/cracking-leetcode/tree/main/0096-unique-binary-search-trees): `0096-unique-binary-search-trees`

### Other components

- **Problem solver**

## Connections

- Problem solver → Array and search solutions: selects and runs
- Problem solver → Window and range solutions: selects and runs
- Problem solver → Heap and greedy solutions: selects and runs
- Problem solver → Prefix sum solutions: selects and runs
- Problem solver → String window solutions: selects and runs
- Problem solver → String and combination solutions: selects and runs
- Problem solver → Tree traversal solutions: selects and runs
- Problem solver → BST solutions: selects and runs
- Problem solver → Tree aggregation solutions: selects and runs
- Problem solver → Linked-list solutions: selects and runs
- Problem solver → Course scheduling solutions: selects and runs
- Problem solver → Graph path solutions: selects and runs
- Problem solver → Grid traversal solutions: selects and runs
- Problem solver → Sequence DP solutions: selects and runs
- Problem solver → Planning DP solutions: selects and runs
- Problem solver → Counting DP solutions: selects and runs
