# zaarakhan-dev/leetcode-solutions architecture

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

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

## Overview

This repository is a collection of independent Python LeetCode solutions, not a shared application: each problem has its own `Solution` method and algorithm. The principal workflow is a platform-supplied input invoking a problem-specific method and receiving its answer. The README highlights array/hash, two-pointer, and sliding-window patterns; those branches are represented below. The solutions do not call one another. The platform interaction is documented, but the runtime harness is not included in the sampled source.

Main entry points: [`217-contains-duplicate/contains-duplicate.py`](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/217-contains-duplicate/contains-duplicate.py) (Contains Duplicate), [`242-valid-anagram/valid-anagram.py`](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/242-valid-anagram/valid-anagram.py) (Valid Anagram), [`1-two-sum/two-sum.py`](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/1-two-sum/two-sum.py) (Two Sum), [`49-group-anagrams/group-anagrams.py`](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/49-group-anagrams/group-anagrams.py) (Group Anagrams)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_hashing["Arrays and Hashing"]
  node_contains_duplicate["Contains Duplicate"]
  node_valid_anagram["Valid Anagram<br/>[valid-anagram.py]"]
  node_two_sum["Two Sum<br/>[two-sum.py]"]
  node_group_anagrams["Group Anagrams<br/>[group-anagrams.py]"]
  node_top_k["Top K Frequent"]
  node_product_except["Product Except Self"]
end

subgraph group_pointers["Two Pointers"]
  node_valid_palindrome["Valid Palindrome"]
  node_two_sum_sorted["Sorted Two Sum"]
  node_reverse_string["Reverse String<br/>[reverse-string.py]"]
  node_move_zeroes["Move Zeroes<br/>[move-zeroes.py]"]
  node_remove_element["Remove Element<br/>[remove-element.py]"]
  node_remove_duplicates["Remove Duplicates"]
  node_sorted_squares["Sorted Squares"]
end

subgraph group_windows["Sliding Windows"]
  node_max_average["Maximum Average"]
  node_min_subarray["Minimum Subarray Length"]
end

node_leetcode(("LeetCode judge"))

node_leetcode -->|"invokes"| node_contains_duplicate
node_leetcode -->|"invokes"| node_valid_anagram
node_leetcode -->|"invokes"| node_two_sum
node_leetcode -->|"invokes"| node_group_anagrams
node_leetcode -->|"invokes"| node_top_k
node_leetcode -->|"invokes"| node_product_except
node_leetcode -->|"invokes"| node_valid_palindrome
node_leetcode -->|"invokes"| node_two_sum_sorted
node_leetcode -->|"invokes"| node_reverse_string
node_leetcode -->|"invokes"| node_move_zeroes
node_leetcode -->|"invokes"| node_remove_element
node_leetcode -->|"invokes"| node_remove_duplicates
node_leetcode -->|"invokes"| node_sorted_squares
node_leetcode -->|"invokes"| node_max_average
node_leetcode -->|"invokes"| node_min_subarray

click node_contains_duplicate "https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/217-contains-duplicate/contains-duplicate.py"
click node_valid_anagram "https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/242-valid-anagram/valid-anagram.py"
click node_two_sum "https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/1-two-sum/two-sum.py"
click node_group_anagrams "https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/49-group-anagrams/group-anagrams.py"
click node_top_k "https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/347-top-k-frequent-elements/top-k-frequent-elements.py"
click node_product_except "https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/238-product-of-array-except-self/product-of-array-except-self.py"
click node_valid_palindrome "https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/125-valid-palindrome/valid-palindrome.py"
click node_two_sum_sorted "https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/167-two-sum-ii-input-array-is-sorted/two-sum-ii-input-array-is-sorted.py"
click node_reverse_string "https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/344-reverse-string/reverse-string.py"
click node_move_zeroes "https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/283-move-zeroes/move-zeroes.py"
click node_remove_element "https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/27-remove-element/remove-element.py"
click node_remove_duplicates "https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/26-remove-duplicates-from-sorted-array/remove-duplicates-from-sorted-array.py"
click node_sorted_squares "https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/1019-squares-of-a-sorted-array/squares-of-a-sorted-array.py"
click node_max_average "https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/643-maximum-average-subarray-i/maximum-average-subarray-i.py"
click node_min_subarray "https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/209-minimum-size-subarray-sum/minimum-size-subarray-sum.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_contains_duplicate,node_valid_anagram,node_two_sum,node_group_anagrams,node_top_k,node_product_except toneBlue
class node_valid_palindrome,node_two_sum_sorted,node_reverse_string,node_move_zeroes,node_remove_element,node_remove_duplicates,node_sorted_squares toneAmber
class node_max_average,node_min_subarray toneMint
class node_leetcode toneIndigo
```

## Components

### Arrays and Hashing

- [Contains Duplicate](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/217-contains-duplicate/contains-duplicate.py): `217-contains-duplicate/contains-duplicate.py`
- [Valid Anagram](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/242-valid-anagram/valid-anagram.py): `242-valid-anagram/valid-anagram.py`
- [Two Sum](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/1-two-sum/two-sum.py): `1-two-sum/two-sum.py`
- [Group Anagrams](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/49-group-anagrams/group-anagrams.py): `49-group-anagrams/group-anagrams.py`
- [Top K Frequent](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/347-top-k-frequent-elements/top-k-frequent-elements.py): `347-top-k-frequent-elements/top-k-frequent-elements.py`
- [Product Except Self](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/238-product-of-array-except-self/product-of-array-except-self.py): `238-product-of-array-except-self/product-of-array-except-self.py`

### Two Pointers

- [Valid Palindrome](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/125-valid-palindrome/valid-palindrome.py): `125-valid-palindrome/valid-palindrome.py`
- [Sorted Two Sum](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/167-two-sum-ii-input-array-is-sorted/two-sum-ii-input-array-is-sorted.py): `167-two-sum-ii-input-array-is-sorted/two-sum-ii-input-array-is-sorted.py`
- [Reverse String](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/344-reverse-string/reverse-string.py): `344-reverse-string/reverse-string.py`
- [Move Zeroes](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/283-move-zeroes/move-zeroes.py): `283-move-zeroes/move-zeroes.py`
- [Remove Element](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/27-remove-element/remove-element.py): `27-remove-element/remove-element.py`
- [Remove Duplicates](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/26-remove-duplicates-from-sorted-array/remove-duplicates-from-sorted-array.py): `26-remove-duplicates-from-sorted-array/remove-duplicates-from-sorted-array.py`
- [Sorted Squares](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/1019-squares-of-a-sorted-array/squares-of-a-sorted-array.py): `1019-squares-of-a-sorted-array/squares-of-a-sorted-array.py`

### Sliding Windows

- [Maximum Average](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/643-maximum-average-subarray-i/maximum-average-subarray-i.py): `643-maximum-average-subarray-i/maximum-average-subarray-i.py`
- [Minimum Subarray Length](https://github.com/zaarakhan-dev/leetcode-solutions/blob/main/209-minimum-size-subarray-sum/minimum-size-subarray-sum.py): `209-minimum-size-subarray-sum/minimum-size-subarray-sum.py`

### Other components

- **LeetCode judge**

## Connections

- LeetCode judge → Contains Duplicate: invokes (evidence: `README.md`)
- LeetCode judge → Valid Anagram: invokes (evidence: `README.md`)
- LeetCode judge → Two Sum: invokes (evidence: `README.md`)
- LeetCode judge → Group Anagrams: invokes (evidence: `README.md`)
- LeetCode judge → Top K Frequent: invokes (evidence: `README.md`)
- LeetCode judge → Product Except Self: invokes (evidence: `README.md`)
- LeetCode judge → Valid Palindrome: invokes (evidence: `README.md`)
- LeetCode judge → Sorted Two Sum: invokes (evidence: `README.md`)
- LeetCode judge → Reverse String: invokes (evidence: `README.md`)
- LeetCode judge → Move Zeroes: invokes (evidence: `README.md`)
- LeetCode judge → Remove Element: invokes (evidence: `README.md`)
- LeetCode judge → Remove Duplicates: invokes (evidence: `README.md`)
- LeetCode judge → Sorted Squares: invokes (evidence: `README.md`)
- LeetCode judge → Maximum Average: invokes (evidence: `README.md`)
- LeetCode judge → Minimum Subarray Length: invokes (evidence: `README.md`)
