# ranahamid/leetcode architecture

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

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

## Overview

This repository is a personal collection of standalone programming-challenge solutions and algorithm examples, not a unified application. The typical workflow is an external judge or caller supplies inputs to one problem-specific method, which computes and returns an answer; the sampled tree shows no shared runtime dispatcher. Algorithm demonstrations (notably graph traversal and heap operations) form a separate educational branch. The map groups major problem collections rather than inventing a cross-solution pipeline; most individual solutions are independent, so their internal links are omitted.

Main entry points: [`LeetCode/Study-Leetcode/127. Word Ladder.cs`](https://github.com/ranahamid/leetcode/blob/master/LeetCode/Study-Leetcode/127.%20Word%20Ladder.cs) (Word Ladder), [`LeetCode/Leet/Contest 302/2343. Query Kth Smallest Trimmed Number.cs`](https://github.com/ranahamid/leetcode/blob/master/LeetCode/Leet/Contest%20302/2343.%20Query%20Kth%20Smallest%20Trimmed%20Number.cs) (Trimmed-number query), [`LeetCode/Program.cs`](https://github.com/ranahamid/leetcode/blob/master/LeetCode/Program.cs) (Sample entry point), [`LeetCode/Leet`](https://github.com/ranahamid/leetcode/tree/master/LeetCode/Leet) (Contest problems)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sol["Challenge solutions"]
  node_contest["Contest problems"]
  node_hacker["HackerRank problems"]
  node_platforms["Other platforms"]
  node_ladder["Word Ladder"]
  node_query["Trimmed-number query"]
  node_power["Power computation<br/>[Pow.cs]"]
end

subgraph group_algo["Algorithm examples"]
  node_bfs["Tree BFS<br/>[BFS Tree.cs]"]
  node_components["Connected components"]
  node_heap["Heap operations<br/>[Heap.cs]"]
  node_priority["Priority queue example<br/>[PriorityQueue.cs]"]
end

subgraph group_helpers["Shared definitions"]
  node_program["Sample entry point<br/>[Program.cs]"]
  node_nodes["Node definitions<br/>[Program.cs]"]
  node_helper["Utility methods<br/>[Program.cs]"]
end

node_caller(("Judge or caller"))

node_caller -.->|"provides input"| node_ladder
node_ladder -->|"returns length"| node_caller
node_caller -.->|"provides queries"| node_query
node_query -->|"returns indices"| node_caller
node_caller -.->|"invokes solution"| node_contest
node_caller -.->|"invokes solution"| node_hacker
node_caller -.->|"invokes solution"| node_platforms
node_program -->|"defines utilities"| node_helper

click node_contest "https://github.com/ranahamid/leetcode/tree/master/LeetCode/Leet"
click node_hacker "https://github.com/ranahamid/leetcode/tree/master/LeetCode/HackerRank"
click node_platforms "https://github.com/ranahamid/leetcode/tree/master/LeetCode/CodeSignal"
click node_ladder "https://github.com/ranahamid/leetcode/blob/master/LeetCode/Study-Leetcode/127.%20Word%20Ladder.cs"
click node_query "https://github.com/ranahamid/leetcode/blob/master/LeetCode/Leet/Contest%20302/2343.%20Query%20Kth%20Smallest%20Trimmed%20Number.cs"
click node_power "https://github.com/ranahamid/leetcode/blob/master/LeetCode/Dynamic/Pow.cs"
click node_bfs "https://github.com/ranahamid/leetcode/blob/master/LeetCode/Algo-1/BFS%20Tree.cs"
click node_components "https://github.com/ranahamid/leetcode/blob/master/LeetCode/Algo-1/Number%20of%20connected%20components.Graph.cs"
click node_heap "https://github.com/ranahamid/leetcode/blob/master/LeetCode/Algo-1/Heap.cs"
click node_priority "https://github.com/ranahamid/leetcode/blob/master/LeetCode/Learn/PriorityQueue.cs"
click node_program "https://github.com/ranahamid/leetcode/blob/master/LeetCode/Program.cs"
click node_nodes "https://github.com/ranahamid/leetcode/blob/master/LeetCode/Program.cs"
click node_helper "https://github.com/ranahamid/leetcode/blob/master/LeetCode/Program.cs"

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_contest,node_hacker,node_platforms,node_ladder,node_query,node_power toneBlue
class node_bfs,node_components,node_heap,node_priority toneAmber
class node_program,node_nodes,node_helper toneMint
class node_caller toneIndigo
```

## Components

### Challenge solutions

- [Contest problems](https://github.com/ranahamid/leetcode/tree/master/LeetCode/Leet): `LeetCode/Leet`
- [HackerRank problems](https://github.com/ranahamid/leetcode/tree/master/LeetCode/HackerRank): `LeetCode/HackerRank`
- [Other platforms](https://github.com/ranahamid/leetcode/tree/master/LeetCode/CodeSignal): `LeetCode/CodeSignal`
- [Word Ladder](https://github.com/ranahamid/leetcode/blob/master/LeetCode/Study-Leetcode/127.%20Word%20Ladder.cs): `LeetCode/Study-Leetcode/127. Word Ladder.cs`
- [Trimmed-number query](https://github.com/ranahamid/leetcode/blob/master/LeetCode/Leet/Contest%20302/2343.%20Query%20Kth%20Smallest%20Trimmed%20Number.cs): `LeetCode/Leet/Contest 302/2343. Query Kth Smallest Trimmed Number.cs`
- [Power computation](https://github.com/ranahamid/leetcode/blob/master/LeetCode/Dynamic/Pow.cs): `LeetCode/Dynamic/Pow.cs`

### Algorithm examples

- [Tree BFS](https://github.com/ranahamid/leetcode/blob/master/LeetCode/Algo-1/BFS%20Tree.cs): `LeetCode/Algo-1/BFS Tree.cs`
- [Connected components](https://github.com/ranahamid/leetcode/blob/master/LeetCode/Algo-1/Number%20of%20connected%20components.Graph.cs): `LeetCode/Algo-1/Number of connected components.Graph.cs`
- [Heap operations](https://github.com/ranahamid/leetcode/blob/master/LeetCode/Algo-1/Heap.cs): `LeetCode/Algo-1/Heap.cs`
- [Priority queue example](https://github.com/ranahamid/leetcode/blob/master/LeetCode/Learn/PriorityQueue.cs): `LeetCode/Learn/PriorityQueue.cs`

### Shared definitions

- [Sample entry point](https://github.com/ranahamid/leetcode/blob/master/LeetCode/Program.cs): `LeetCode/Program.cs`
- [Node definitions](https://github.com/ranahamid/leetcode/blob/master/LeetCode/Program.cs): `LeetCode/Program.cs`
- [Utility methods](https://github.com/ranahamid/leetcode/blob/master/LeetCode/Program.cs): `LeetCode/Program.cs`

### Other components

- **Judge or caller**

## Connections

- Judge or caller → Word Ladder: provides input
- Word Ladder → Judge or caller: returns length (evidence: `LeetCode/Study-Leetcode/127. Word Ladder.cs`)
- Judge or caller → Trimmed-number query: provides queries
- Trimmed-number query → Judge or caller: returns indices (evidence: `LeetCode/Leet/Contest 302/2343. Query Kth Smallest Trimmed Number.cs`)
- Judge or caller → Contest problems: invokes solution
- Judge or caller → HackerRank problems: invokes solution
- Judge or caller → Other platforms: invokes solution
- Sample entry point → Utility methods: defines utilities (evidence: `LeetCode/Program.cs`)
