# nishantdubey-tech/leetcode architecture

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

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

## Overview

This repository is a LeetCode practice collection: users choose a problem, provide its expected input, and run or submit that problem’s standalone C++ solution to obtain an answer. The files are independent snippets, not stages in a shared application pipeline. The graph groups representative solutions by algorithm domain; edges from the user are dashed because the repository shows no common runner or dispatch mechanism. The README documents a broader topic catalog, and the tree contains many additional standalone solutions not individually shown here.

Main entry points: [`0074-search-a-2d-matrix/0074-search-a-2d-matrix.cpp`](https://github.com/nishantdubey-tech/leetcode/blob/main/0074-search-a-2d-matrix/0074-search-a-2d-matrix.cpp) (Array Search), [`0056-merge-intervals/0056-merge-intervals.cpp`](https://github.com/nishantdubey-tech/leetcode/blob/main/0056-merge-intervals/0056-merge-intervals.cpp) (Intervals), [`0018-4sum/0018-4sum.cpp`](https://github.com/nishantdubey-tech/leetcode/blob/main/0018-4sum/0018-4sum.cpp) (Array Pairing), [`0079-word-search/0079-word-search.cpp`](https://github.com/nishantdubey-tech/leetcode/blob/main/0079-word-search/0079-word-search.cpp) (Word Search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_arrays["Arrays &amp; Intervals"]
  node_array_search["Array Search"]
  node_intervals["Intervals"]
  node_array_pairs["Array Pairing<br/>[0018-4sum.cpp]"]
end

subgraph group_strings["Strings &amp; Search"]
  node_string_search["Word Search"]
  node_word_ladders["Word Ladders"]
end

subgraph group_trees["Tree Algorithms"]
  node_tree_bst["BST Operations"]
  node_tree_validate["BST Validation"]
  node_tree_recovery["BST Recovery"]
  node_tree_iterator["BST Iterator"]
  node_tree_codec["Tree Codec"]
  node_tree_distance["Tree Distance"]
end

subgraph group_graphs["Graphs &amp; Grids"]
  node_graph_courses["Course Ordering"]
  node_graph_grid["Grid Paths"]
  node_graph_connectivity["Graph Connectivity"]
end

subgraph group_dp["Dynamic Programming"]
  node_dp_matrix["Matrix DP"]
  node_dp_sequences["Sequence DP"]
  node_dp_paths["Path DP"]
end

node_user(("Problem Solver"))

node_user -.->|"chooses problem"| node_array_search
node_user -.->|"chooses problem"| node_intervals
node_user -.->|"chooses problem"| node_array_pairs
node_user -.->|"chooses problem"| node_string_search
node_user -.->|"chooses problem"| node_word_ladders
node_user -.->|"chooses problem"| node_tree_bst
node_user -.->|"chooses problem"| node_tree_validate
node_user -.->|"chooses problem"| node_tree_recovery
node_user -.->|"chooses problem"| node_tree_iterator
node_user -.->|"chooses problem"| node_tree_codec
node_user -.->|"chooses problem"| node_tree_distance
node_user -.->|"chooses problem"| node_graph_courses
node_user -.->|"chooses problem"| node_graph_grid
node_user -.->|"chooses problem"| node_graph_connectivity
node_user -.->|"chooses problem"| node_dp_matrix
node_user -.->|"chooses problem"| node_dp_sequences
node_user -.->|"chooses problem"| node_dp_paths

click node_array_search "https://github.com/nishantdubey-tech/leetcode/blob/main/0074-search-a-2d-matrix/0074-search-a-2d-matrix.cpp"
click node_intervals "https://github.com/nishantdubey-tech/leetcode/blob/main/0056-merge-intervals/0056-merge-intervals.cpp"
click node_array_pairs "https://github.com/nishantdubey-tech/leetcode/blob/main/0018-4sum/0018-4sum.cpp"
click node_string_search "https://github.com/nishantdubey-tech/leetcode/blob/main/0079-word-search/0079-word-search.cpp"
click node_word_ladders "https://github.com/nishantdubey-tech/leetcode/blob/main/0126-word-ladder-ii/0126-word-ladder-ii.cpp"
click node_tree_bst "https://github.com/nishantdubey-tech/leetcode/blob/main/0701-insert-into-a-binary-search-tree/0701-insert-into-a-binary-search-tree.cpp"
click node_tree_validate "https://github.com/nishantdubey-tech/leetcode/blob/main/0098-validate-binary-search-tree/0098-validate-binary-search-tree.cpp"
click node_tree_recovery "https://github.com/nishantdubey-tech/leetcode/blob/main/0099-recover-binary-search-tree/0099-recover-binary-search-tree.cpp"
click node_tree_iterator "https://github.com/nishantdubey-tech/leetcode/blob/main/0173-binary-search-tree-iterator/0173-binary-search-tree-iterator.cpp"
click node_tree_codec "https://github.com/nishantdubey-tech/leetcode/blob/main/0297-serialize-and-deserialize-binary-tree/0297-serialize-and-deserialize-binary-tree.cpp"
click node_tree_distance "https://github.com/nishantdubey-tech/leetcode/blob/main/0863-all-nodes-distance-k-in-binary-tree/0863-all-nodes-distance-k-in-binary-tree.cpp"
click node_graph_courses "https://github.com/nishantdubey-tech/leetcode/blob/main/0210-course-schedule-ii/0210-course-schedule-ii.cpp"
click node_graph_grid "https://github.com/nishantdubey-tech/leetcode/blob/main/1091-shortest-path-in-binary-matrix/1091-shortest-path-in-binary-matrix.cpp"
click node_dp_matrix "https://github.com/nishantdubey-tech/leetcode/blob/main/0085-maximal-rectangle/0085-maximal-rectangle.cpp"
click node_dp_sequences "https://github.com/nishantdubey-tech/leetcode/blob/main/1092-shortest-common-supersequence/1092-shortest-common-supersequence.cpp"
click node_dp_paths "https://github.com/nishantdubey-tech/leetcode/blob/main/0063-unique-paths-ii/0063-unique-paths-ii.cpp"

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_intervals,node_array_pairs toneBlue
class node_string_search,node_word_ladders toneAmber
class node_tree_bst,node_tree_validate,node_tree_recovery,node_tree_iterator,node_tree_codec,node_tree_distance toneMint
class node_graph_courses,node_graph_grid,node_graph_connectivity toneRose
class node_dp_matrix,node_dp_sequences,node_dp_paths,node_user toneIndigo
```

## Components

### Arrays & Intervals

- [Array Search](https://github.com/nishantdubey-tech/leetcode/blob/main/0074-search-a-2d-matrix/0074-search-a-2d-matrix.cpp): `0074-search-a-2d-matrix/0074-search-a-2d-matrix.cpp`
- [Intervals](https://github.com/nishantdubey-tech/leetcode/blob/main/0056-merge-intervals/0056-merge-intervals.cpp): `0056-merge-intervals/0056-merge-intervals.cpp`
- [Array Pairing](https://github.com/nishantdubey-tech/leetcode/blob/main/0018-4sum/0018-4sum.cpp): `0018-4sum/0018-4sum.cpp`

### Strings & Search

- [Word Search](https://github.com/nishantdubey-tech/leetcode/blob/main/0079-word-search/0079-word-search.cpp): `0079-word-search/0079-word-search.cpp`
- [Word Ladders](https://github.com/nishantdubey-tech/leetcode/blob/main/0126-word-ladder-ii/0126-word-ladder-ii.cpp): `0126-word-ladder-ii/0126-word-ladder-ii.cpp`

### Tree Algorithms

- [BST Operations](https://github.com/nishantdubey-tech/leetcode/blob/main/0701-insert-into-a-binary-search-tree/0701-insert-into-a-binary-search-tree.cpp): `0701-insert-into-a-binary-search-tree/0701-insert-into-a-binary-search-tree.cpp`
- [BST Validation](https://github.com/nishantdubey-tech/leetcode/blob/main/0098-validate-binary-search-tree/0098-validate-binary-search-tree.cpp): `0098-validate-binary-search-tree/0098-validate-binary-search-tree.cpp`
- [BST Recovery](https://github.com/nishantdubey-tech/leetcode/blob/main/0099-recover-binary-search-tree/0099-recover-binary-search-tree.cpp): `0099-recover-binary-search-tree/0099-recover-binary-search-tree.cpp`
- [BST Iterator](https://github.com/nishantdubey-tech/leetcode/blob/main/0173-binary-search-tree-iterator/0173-binary-search-tree-iterator.cpp): `0173-binary-search-tree-iterator/0173-binary-search-tree-iterator.cpp`
- [Tree Codec](https://github.com/nishantdubey-tech/leetcode/blob/main/0297-serialize-and-deserialize-binary-tree/0297-serialize-and-deserialize-binary-tree.cpp): `0297-serialize-and-deserialize-binary-tree/0297-serialize-and-deserialize-binary-tree.cpp`
- [Tree Distance](https://github.com/nishantdubey-tech/leetcode/blob/main/0863-all-nodes-distance-k-in-binary-tree/0863-all-nodes-distance-k-in-binary-tree.cpp): `0863-all-nodes-distance-k-in-binary-tree/0863-all-nodes-distance-k-in-binary-tree.cpp`

### Graphs & Grids

- [Course Ordering](https://github.com/nishantdubey-tech/leetcode/blob/main/0210-course-schedule-ii/0210-course-schedule-ii.cpp): `0210-course-schedule-ii/0210-course-schedule-ii.cpp`
- [Grid Paths](https://github.com/nishantdubey-tech/leetcode/blob/main/1091-shortest-path-in-binary-matrix/1091-shortest-path-in-binary-matrix.cpp): `1091-shortest-path-in-binary-matrix/1091-shortest-path-in-binary-matrix.cpp`
- **Graph Connectivity**

### Dynamic Programming

- [Matrix DP](https://github.com/nishantdubey-tech/leetcode/blob/main/0085-maximal-rectangle/0085-maximal-rectangle.cpp): `0085-maximal-rectangle/0085-maximal-rectangle.cpp`
- [Sequence DP](https://github.com/nishantdubey-tech/leetcode/blob/main/1092-shortest-common-supersequence/1092-shortest-common-supersequence.cpp): `1092-shortest-common-supersequence/1092-shortest-common-supersequence.cpp`
- [Path DP](https://github.com/nishantdubey-tech/leetcode/blob/main/0063-unique-paths-ii/0063-unique-paths-ii.cpp): `0063-unique-paths-ii/0063-unique-paths-ii.cpp`

### Other components

- **Problem Solver**

## Connections

- Problem Solver → Array Search: chooses problem
- Problem Solver → Intervals: chooses problem
- Problem Solver → Array Pairing: chooses problem
- Problem Solver → Word Search: chooses problem
- Problem Solver → Word Ladders: chooses problem
- Problem Solver → BST Operations: chooses problem
- Problem Solver → BST Validation: chooses problem
- Problem Solver → BST Recovery: chooses problem
- Problem Solver → BST Iterator: chooses problem
- Problem Solver → Tree Codec: chooses problem
- Problem Solver → Tree Distance: chooses problem
- Problem Solver → Course Ordering: chooses problem
- Problem Solver → Grid Paths: chooses problem
- Problem Solver → Graph Connectivity: chooses problem
- Problem Solver → Matrix DP: chooses problem
- Problem Solver → Sequence DP: chooses problem
- Problem Solver → Path DP: chooses problem
