# lpmn374/leetcode-solutions architecture

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

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

## Overview

This repository is a collection of independent LeetCode solution snippets, not a single application or shared runtime. The principal workflow is that a learner or judge supplies a problem’s inputs to its corresponding solution and receives its answer; the README also describes learning progress and topic statistics tracked separately in a spreadsheet. Solutions span arrays, strings, search, graphs, grids, and other algorithmic topics. Sampled files show self-contained functions rather than shared services or a common execution layer, so the graph groups representative solutions by domain and does not imply calls between them. Many listed solutions were not sampled.

Main entry points: [`0643-maximum-average-subarray-i/0643-maximum-average-subarray-i.js`](https://github.com/lpmn374/leetcode-solutions/blob/main/0643-maximum-average-subarray-i/0643-maximum-average-subarray-i.js) (Array solutions), [`3194-minimum-average-of-smallest-and-largest-elements/3194-minimum-average-of-smallest-and-largest-elements.js`](https://github.com/lpmn374/leetcode-solutions/blob/main/3194-minimum-average-of-smallest-and-largest-elements/3194-minimum-average-of-smallest-and-largest-elements.js) (Array transforms), [`0301-remove-invalid-parentheses/0301-remove-invalid-parentheses.js`](https://github.com/lpmn374/leetcode-solutions/blob/main/0301-remove-invalid-parentheses/0301-remove-invalid-parentheses.js) (String solutions), [`3093-longest-common-suffix-queries/3093-longest-common-suffix-queries.js`](https://github.com/lpmn374/leetcode-solutions/blob/main/3093-longest-common-suffix-queries/3093-longest-common-suffix-queries.js) (Suffix trie query)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_arrays["Array algorithms"]
  node_array_examples["Array solutions"]
  node_array_transform["Array transforms"]
end

subgraph group_strings["String algorithms"]
  node_string_examples["String solutions"]
  node_suffix_queries["Suffix trie query"]
  node_string_compare["String comparison"]
end

subgraph group_search["Search and ordering"]
  node_binary_search["Binary search"]
  node_rotated_search["Rotated search"]
  node_insert_position["Insert position"]
end

subgraph group_graphs["Graphs and grids"]
  node_graph_search["Graph path search"]
  node_jump_search["Jump game BFS"]
  node_grid_spread["Grid simulation"]
end

subgraph group_other["Other problems"]
  node_tree_walk["Tree construction"]
  node_dp_example["Dynamic programming"]
end

node_learner(("Learner or judge"))
node_leetcode(("LeetCode problem"))
node_answer["Computed answer"]

node_learner -->|"chooses problem"| node_leetcode
node_leetcode -.->|"provides inputs"| node_array_examples
node_leetcode -.->|"provides inputs"| node_array_transform
node_leetcode -.->|"provides inputs"| node_string_examples
node_leetcode -.->|"provides inputs"| node_suffix_queries
node_leetcode -.->|"provides inputs"| node_string_compare
node_leetcode -.->|"provides inputs"| node_binary_search
node_leetcode -.->|"provides inputs"| node_rotated_search
node_leetcode -.->|"provides inputs"| node_insert_position
node_leetcode -.->|"provides inputs"| node_graph_search
node_leetcode -.->|"provides inputs"| node_jump_search
node_leetcode -.->|"provides inputs"| node_grid_spread
node_leetcode -.->|"provides inputs"| node_tree_walk
node_leetcode -.->|"provides inputs"| node_dp_example
node_array_examples -.->|"returns result"| node_answer
node_array_transform -.->|"returns result"| node_answer
node_string_examples -.->|"returns result"| node_answer
node_suffix_queries -.->|"returns result"| node_answer
node_string_compare -.->|"returns result"| node_answer
node_binary_search -.->|"returns result"| node_answer
node_rotated_search -.->|"returns result"| node_answer
node_insert_position -.->|"returns result"| node_answer
node_graph_search -.->|"returns result"| node_answer
node_jump_search -.->|"returns result"| node_answer
node_grid_spread -.->|"returns result"| node_answer
node_tree_walk -.->|"returns result"| node_answer
node_dp_example -.->|"returns result"| node_answer

click node_array_examples "https://github.com/lpmn374/leetcode-solutions/blob/main/0643-maximum-average-subarray-i/0643-maximum-average-subarray-i.js"
click node_array_transform "https://github.com/lpmn374/leetcode-solutions/blob/main/3194-minimum-average-of-smallest-and-largest-elements/3194-minimum-average-of-smallest-and-largest-elements.js"
click node_string_examples "https://github.com/lpmn374/leetcode-solutions/blob/main/0301-remove-invalid-parentheses/0301-remove-invalid-parentheses.js"
click node_suffix_queries "https://github.com/lpmn374/leetcode-solutions/blob/main/3093-longest-common-suffix-queries/3093-longest-common-suffix-queries.js"
click node_string_compare "https://github.com/lpmn374/leetcode-solutions/blob/main/0844-backspace-string-compare/0844-backspace-string-compare.js"
click node_binary_search "https://github.com/lpmn374/leetcode-solutions/blob/main/0704-binary-search/0704-binary-search.js"
click node_rotated_search "https://github.com/lpmn374/leetcode-solutions/blob/main/0033-search-in-rotated-sorted-array/0033-search-in-rotated-sorted-array.js"
click node_insert_position "https://github.com/lpmn374/leetcode-solutions/blob/main/0035-search-insert-position/0035-search-insert-position.js"
click node_graph_search "https://github.com/lpmn374/leetcode-solutions/blob/main/1971-find-if-path-exists-in-graph/1971-find-if-path-exists-in-graph.js"
click node_jump_search "https://github.com/lpmn374/leetcode-solutions/blob/main/1345-jump-game-iv/1345-jump-game-iv.js"
click node_grid_spread "https://github.com/lpmn374/leetcode-solutions/blob/main/0994-rotting-oranges/0994-rotting-oranges.js"
click node_tree_walk "https://github.com/lpmn374/leetcode-solutions/blob/main/0654-maximum-binary-tree/0654-maximum-binary-tree.js"
click node_dp_example "https://github.com/lpmn374/leetcode-solutions/blob/main/1340-jump-game-v/1340-jump-game-v.js"

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_examples,node_array_transform toneBlue
class node_string_examples,node_suffix_queries,node_string_compare toneAmber
class node_binary_search,node_rotated_search,node_insert_position toneMint
class node_graph_search,node_jump_search,node_grid_spread toneRose
class node_tree_walk,node_dp_example,node_learner,node_leetcode,node_answer toneIndigo
```

## Components

### Array algorithms

- [Array solutions](https://github.com/lpmn374/leetcode-solutions/blob/main/0643-maximum-average-subarray-i/0643-maximum-average-subarray-i.js): `0643-maximum-average-subarray-i/0643-maximum-average-subarray-i.js`
- [Array transforms](https://github.com/lpmn374/leetcode-solutions/blob/main/3194-minimum-average-of-smallest-and-largest-elements/3194-minimum-average-of-smallest-and-largest-elements.js): `3194-minimum-average-of-smallest-and-largest-elements/3194-minimum-average-of-smallest-and-largest-elements.js`

### String algorithms

- [String solutions](https://github.com/lpmn374/leetcode-solutions/blob/main/0301-remove-invalid-parentheses/0301-remove-invalid-parentheses.js): `0301-remove-invalid-parentheses/0301-remove-invalid-parentheses.js`
- [Suffix trie query](https://github.com/lpmn374/leetcode-solutions/blob/main/3093-longest-common-suffix-queries/3093-longest-common-suffix-queries.js): `3093-longest-common-suffix-queries/3093-longest-common-suffix-queries.js`
- [String comparison](https://github.com/lpmn374/leetcode-solutions/blob/main/0844-backspace-string-compare/0844-backspace-string-compare.js): `0844-backspace-string-compare/0844-backspace-string-compare.js`

### Search and ordering

- [Binary search](https://github.com/lpmn374/leetcode-solutions/blob/main/0704-binary-search/0704-binary-search.js): `0704-binary-search/0704-binary-search.js`
- [Rotated search](https://github.com/lpmn374/leetcode-solutions/blob/main/0033-search-in-rotated-sorted-array/0033-search-in-rotated-sorted-array.js): `0033-search-in-rotated-sorted-array/0033-search-in-rotated-sorted-array.js`
- [Insert position](https://github.com/lpmn374/leetcode-solutions/blob/main/0035-search-insert-position/0035-search-insert-position.js): `0035-search-insert-position/0035-search-insert-position.js`

### Graphs and grids

- [Graph path search](https://github.com/lpmn374/leetcode-solutions/blob/main/1971-find-if-path-exists-in-graph/1971-find-if-path-exists-in-graph.js): `1971-find-if-path-exists-in-graph/1971-find-if-path-exists-in-graph.js`
- [Jump game BFS](https://github.com/lpmn374/leetcode-solutions/blob/main/1345-jump-game-iv/1345-jump-game-iv.js): `1345-jump-game-iv/1345-jump-game-iv.js`
- [Grid simulation](https://github.com/lpmn374/leetcode-solutions/blob/main/0994-rotting-oranges/0994-rotting-oranges.js): `0994-rotting-oranges/0994-rotting-oranges.js`

### Other problems

- [Tree construction](https://github.com/lpmn374/leetcode-solutions/blob/main/0654-maximum-binary-tree/0654-maximum-binary-tree.js): `0654-maximum-binary-tree/0654-maximum-binary-tree.js`
- [Dynamic programming](https://github.com/lpmn374/leetcode-solutions/blob/main/1340-jump-game-v/1340-jump-game-v.js): `1340-jump-game-v/1340-jump-game-v.js`

### Other components

- **Learner or judge**
- **LeetCode problem**
- **Computed answer**

## Connections

- Learner or judge → LeetCode problem: chooses problem (evidence: `README.md`)
- LeetCode problem → Array solutions: provides inputs
- LeetCode problem → Array transforms: provides inputs
- LeetCode problem → String solutions: provides inputs
- LeetCode problem → Suffix trie query: provides inputs
- LeetCode problem → String comparison: provides inputs
- LeetCode problem → Binary search: provides inputs
- LeetCode problem → Rotated search: provides inputs
- LeetCode problem → Insert position: provides inputs
- LeetCode problem → Graph path search: provides inputs
- LeetCode problem → Jump game BFS: provides inputs
- LeetCode problem → Grid simulation: provides inputs
- LeetCode problem → Tree construction: provides inputs
- LeetCode problem → Dynamic programming: provides inputs
- Array solutions → Computed answer: returns result
- Array transforms → Computed answer: returns result
- String solutions → Computed answer: returns result
- Suffix trie query → Computed answer: returns result
- String comparison → Computed answer: returns result
- Binary search → Computed answer: returns result
- Rotated search → Computed answer: returns result
- Insert position → Computed answer: returns result
- Graph path search → Computed answer: returns result
- Jump game BFS → Computed answer: returns result
- Grid simulation → Computed answer: returns result
- Tree construction → Computed answer: returns result
- Dynamic programming → Computed answer: returns result
