# santhikumaryadavalli/leetcode architecture

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

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

## Overview

This repository is a collection of standalone Python solutions and algorithm templates for LeetCode-style problems, not a single application. A user selects an implementation, supplies problem input, and receives a computed result; the files do not form a shared runtime pipeline. The graph groups the collection by algorithm domain and preserves contest and daily-challenge solutions as a distinct branch. Relationships between independent files are not inferred. The README is minimal, so the workflow is based on the repository contents; only a few internal calls are shown where excerpts support them.

Main entry points: [`Linked List/merge_sort.py`](https://github.com/santhikumaryadavalli/leetcode/blob/main/Linked%20List/merge_sort.py) (List Merge Sort), [`Sortings/quick_sort.py`](https://github.com/santhikumaryadavalli/leetcode/blob/main/Sortings/quick_sort.py) (Array Sorting), [`Arrays/2_second_largest_element_in_an_array.py`](https://github.com/santhikumaryadavalli/leetcode/blob/main/Arrays/2_second_largest_element_in_an_array.py) (Array Basics), [`Arrays/11_longest_subarray_with_sum_K.py`](https://github.com/santhikumaryadavalli/leetcode/blob/main/Arrays/11_longest_subarray_with_sum_K.py) (Subarray Sums)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_arrays["Array Algorithms"]
  node_array_basics["Array Basics"]
  node_array_subarrays["Subarray Sums"]
  node_array_transform["Array Transforms"]
end

subgraph group_structures["Data Structures"]
  node_tree_traversals["Tree Traversals"]
  node_linked_list_ops["Linked Lists<br/>[merge_sort.py]"]
  node_trie["Trie<br/>[trie.py]"]
  node_linked_merge["List Merge Sort<br/>[merge_sort.py]"]
end

subgraph group_graphs["Graph Algorithms"]
  node_graph_traversal["Graph Traversal<br/>[BFS.py]"]
  node_dsu["Disjoint Sets<br/>[DSU.py]"]
  node_dijkstra["Dijkstra Templates<br/>[Dijkstra.py]"]
  node_topological_sort["Topological Sort"]
end

subgraph group_foundations["Algorithm Templates"]
  node_sorting["Array Sorting<br/>[quick_sort.py]"]
  node_prime_tools["Prime Utilities<br/>[prime_factors.py]"]
  node_string_search["String Search<br/>[KMP.py]"]
  node_partition["Partition Helper<br/>[quick_sort.py]"]
end

subgraph group_challenges["Problem Solutions"]
  node_contest_biweekly["Biweekly Solutions"]
  node_contest_weekly["Weekly Solutions"]
  node_daily_challenges["Daily Challenges<br/>[135. Candy.py]"]
end

node_user(("Problem Solver"))

node_user -.->|"selects solution"| node_array_basics
node_user -.->|"selects solution"| node_array_subarrays
node_user -.->|"selects solution"| node_array_transform
node_user -.->|"selects solution"| node_tree_traversals
node_user -.->|"selects solution"| node_linked_list_ops
node_user -.->|"selects template"| node_trie
node_user -.->|"selects template"| node_graph_traversal
node_user -.->|"selects template"| node_dsu
node_user -.->|"selects template"| node_dijkstra
node_user -.->|"selects template"| node_topological_sort
node_user -.->|"selects template"| node_sorting
node_user -.->|"selects template"| node_prime_tools
node_user -.->|"selects template"| node_string_search
node_user -.->|"selects solution"| node_contest_biweekly
node_user -.->|"selects solution"| node_contest_weekly
node_user -.->|"selects solution"| node_daily_challenges
node_linked_merge -->|"recurses and merges"| node_linked_merge
node_sorting -->|"partitions array"| node_partition

click node_array_basics "https://github.com/santhikumaryadavalli/leetcode/blob/main/Arrays/2_second_largest_element_in_an_array.py"
click node_array_subarrays "https://github.com/santhikumaryadavalli/leetcode/blob/main/Arrays/11_longest_subarray_with_sum_K.py"
click node_array_transform "https://github.com/santhikumaryadavalli/leetcode/blob/main/Arrays/6_LC-189.%20Rotate%20Array.py"
click node_tree_traversals "https://github.com/santhikumaryadavalli/leetcode/blob/main/Binary%20Trees/level-order_traversal.py"
click node_linked_list_ops "https://github.com/santhikumaryadavalli/leetcode/blob/main/Linked%20List/merge_sort.py"
click node_trie "https://github.com/santhikumaryadavalli/leetcode/blob/main/Trie/templates/trie.py"
click node_graph_traversal "https://github.com/santhikumaryadavalli/leetcode/blob/main/Graphs/BFS.py"
click node_dsu "https://github.com/santhikumaryadavalli/leetcode/blob/main/Graphs/DSU.py"
click node_dijkstra "https://github.com/santhikumaryadavalli/leetcode/blob/main/Graphs/templates/Dijkstra.py"
click node_topological_sort "https://github.com/santhikumaryadavalli/leetcode/blob/main/Graphs/templates/topological_sort.py"
click node_sorting "https://github.com/santhikumaryadavalli/leetcode/blob/main/Sortings/quick_sort.py"
click node_prime_tools "https://github.com/santhikumaryadavalli/leetcode/blob/main/Math/templates/prime_factors.py"
click node_string_search "https://github.com/santhikumaryadavalli/leetcode/blob/main/Strings/templates/KMP.py"
click node_contest_biweekly "https://github.com/santhikumaryadavalli/leetcode/blob/main/Contests/biweekly156/3543_Maximum%20Weighted%20K-Edge%20Path.py"
click node_contest_weekly "https://github.com/santhikumaryadavalli/leetcode/blob/main/Contests/weekly450/3552_%20Grid%20Teleportation%20Traversal.py"
click node_daily_challenges "https://github.com/santhikumaryadavalli/leetcode/blob/main/POTD's/135.%20Candy.py"
click node_linked_merge "https://github.com/santhikumaryadavalli/leetcode/blob/main/Linked%20List/merge_sort.py"
click node_partition "https://github.com/santhikumaryadavalli/leetcode/blob/main/Sortings/quick_sort.py"

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_basics,node_array_subarrays,node_array_transform toneBlue
class node_tree_traversals,node_linked_list_ops,node_trie,node_linked_merge toneAmber
class node_graph_traversal,node_dsu,node_dijkstra,node_topological_sort toneMint
class node_sorting,node_prime_tools,node_string_search,node_partition toneRose
class node_contest_biweekly,node_contest_weekly,node_daily_challenges,node_user toneIndigo
```

## Components

### Array Algorithms

- [Array Basics](https://github.com/santhikumaryadavalli/leetcode/blob/main/Arrays/2_second_largest_element_in_an_array.py): `Arrays/2_second_largest_element_in_an_array.py`
- [Subarray Sums](https://github.com/santhikumaryadavalli/leetcode/blob/main/Arrays/11_longest_subarray_with_sum_K.py): `Arrays/11_longest_subarray_with_sum_K.py`
- [Array Transforms](https://github.com/santhikumaryadavalli/leetcode/blob/main/Arrays/6_LC-189.%20Rotate%20Array.py): `Arrays/6_LC-189. Rotate Array.py`

### Data Structures

- [Tree Traversals](https://github.com/santhikumaryadavalli/leetcode/blob/main/Binary%20Trees/level-order_traversal.py): `Binary Trees/level-order_traversal.py`
- [Linked Lists](https://github.com/santhikumaryadavalli/leetcode/blob/main/Linked%20List/merge_sort.py): `Linked List/merge_sort.py`
- [Trie](https://github.com/santhikumaryadavalli/leetcode/blob/main/Trie/templates/trie.py): `Trie/templates/trie.py`
- [List Merge Sort](https://github.com/santhikumaryadavalli/leetcode/blob/main/Linked%20List/merge_sort.py): `Linked List/merge_sort.py`

### Graph Algorithms

- [Graph Traversal](https://github.com/santhikumaryadavalli/leetcode/blob/main/Graphs/BFS.py): `Graphs/BFS.py`
- [Disjoint Sets](https://github.com/santhikumaryadavalli/leetcode/blob/main/Graphs/DSU.py): `Graphs/DSU.py`
- [Dijkstra Templates](https://github.com/santhikumaryadavalli/leetcode/blob/main/Graphs/templates/Dijkstra.py): `Graphs/templates/Dijkstra.py`
- [Topological Sort](https://github.com/santhikumaryadavalli/leetcode/blob/main/Graphs/templates/topological_sort.py): `Graphs/templates/topological_sort.py`

### Algorithm Templates

- [Array Sorting](https://github.com/santhikumaryadavalli/leetcode/blob/main/Sortings/quick_sort.py): `Sortings/quick_sort.py`
- [Prime Utilities](https://github.com/santhikumaryadavalli/leetcode/blob/main/Math/templates/prime_factors.py): `Math/templates/prime_factors.py`
- [String Search](https://github.com/santhikumaryadavalli/leetcode/blob/main/Strings/templates/KMP.py): `Strings/templates/KMP.py`
- [Partition Helper](https://github.com/santhikumaryadavalli/leetcode/blob/main/Sortings/quick_sort.py): `Sortings/quick_sort.py`

### Problem Solutions

- [Biweekly Solutions](https://github.com/santhikumaryadavalli/leetcode/blob/main/Contests/biweekly156/3543_Maximum%20Weighted%20K-Edge%20Path.py): `Contests/biweekly156/3543_Maximum Weighted K-Edge Path.py`
- [Weekly Solutions](https://github.com/santhikumaryadavalli/leetcode/blob/main/Contests/weekly450/3552_%20Grid%20Teleportation%20Traversal.py): `Contests/weekly450/3552_ Grid Teleportation Traversal.py`
- [Daily Challenges](https://github.com/santhikumaryadavalli/leetcode/blob/main/POTD's/135.%20Candy.py): `POTD's/135. Candy.py`

### Other components

- **Problem Solver**

## Connections

- Problem Solver → Array Basics: selects solution
- Problem Solver → Subarray Sums: selects solution
- Problem Solver → Array Transforms: selects solution
- Problem Solver → Tree Traversals: selects solution
- Problem Solver → Linked Lists: selects solution
- Problem Solver → Trie: selects template
- Problem Solver → Graph Traversal: selects template
- Problem Solver → Disjoint Sets: selects template
- Problem Solver → Dijkstra Templates: selects template
- Problem Solver → Topological Sort: selects template
- Problem Solver → Array Sorting: selects template
- Problem Solver → Prime Utilities: selects template
- Problem Solver → String Search: selects template
- Problem Solver → Biweekly Solutions: selects solution
- Problem Solver → Weekly Solutions: selects solution
- Problem Solver → Daily Challenges: selects solution
- List Merge Sort → List Merge Sort: recurses and merges (evidence: `Linked List/merge_sort.py`)
- Array Sorting → Partition Helper: partitions array (evidence: `Sortings/quick_sort.py`)
