# wangzheng0822/algo architecture

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

- Interactive diagram: https://gitdiagram.com/wangzheng0822/algo
- Repository: https://github.com/wangzheng0822/algo

## Overview

This repository is a multilingual collection of data-structure and algorithm implementations, organized as educational examples rather than a single application. A learner can explore a topic, inspect an implementation in a chosen language, and run examples where provided. The graph preserves the README’s major capability areas and represents several sampled PHP demonstrations; it does not imply a universal runtime pipeline. Unsampled modules are included only where the tree or README supports them, so their internal call relationships are not asserted.

Main entry points: [`php/06_linkedlist/SingleLinkedList.php`](https://github.com/wangzheng0822/algo/blob/master/php/06_linkedlist/SingleLinkedList.php) (Linked lists), [`php/08_stack/StackOnLinkedList.php`](https://github.com/wangzheng0822/algo/blob/master/php/08_stack/StackOnLinkedList.php) (Stacks), [`php/09_queue/QueueOnLinkedList.php`](https://github.com/wangzheng0822/algo/blob/master/php/09_queue/QueueOnLinkedList.php) (Queues), [`php/10_heap/Heap.php`](https://github.com/wangzheng0822/algo/blob/master/php/10_heap/Heap.php) (Heap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_linear["Linear structures"]
  node_arrays["Arrays<br/>[Array.java]"]
  node_linked["Linked lists"]
  node_listalgo["List algorithms<br/>[main.php]"]
  node_stack["Stacks"]
  node_stackdemo["Stack example<br/>[main.php]"]
  node_queue["Queues"]
  node_queuedemo["Queue example<br/>[main.php]"]
end

subgraph group_order["Ordering and search"]
  node_sorting["Sorting<br/>[Sorts.java]"]
  node_search["Binary search"]
end

subgraph group_indexed["Indexed structures"]
  node_hashing["Hash tables<br/>[HashTable.java]"]
  node_lru["LRU caches"]
  node_skiplist["Skip lists<br/>[SkipList.java]"]
  node_trie["Trie and matching<br/>[trie_.py]"]
  node_heap["Heap<br/>[Heap.php]"]
  node_heapdemo["Heap example<br/>[main.php]"]
end

subgraph group_trees["Trees and graphs"]
  node_trees["Binary trees<br/>[Tree.php]"]
  node_treedemo["Tree example<br/>[main.php]"]
  node_bst["Search trees<br/>[binarysearchtree.h]"]
  node_graph["Graph algorithms<br/>[dijkstra.py]"]
end

subgraph group_problem["Algorithmic problems"]
  node_backtracking["Backtracking<br/>[eight_queens.py]"]
  node_dynamic["Dynamic programming<br/>[coins_problem.py]"]
  node_recursion["Recursion<br/>[Fibonacci.go]"]
  node_divide["Divide and conquer"]
end

node_learner(("Learner"))

node_learner -->|"explores"| node_arrays
node_learner -->|"explores"| node_linked
node_learner -->|"explores"| node_stack
node_learner -->|"explores"| node_queue
node_learner -->|"explores"| node_sorting
node_learner -->|"explores"| node_search
node_learner -->|"explores"| node_hashing
node_learner -->|"explores"| node_heap
node_learner -->|"explores"| node_trees
node_learner -->|"explores"| node_graph
node_learner -->|"explores"| node_backtracking
node_learner -->|"explores"| node_dynamic
node_learner -->|"explores"| node_recursion
node_learner -->|"explores"| node_divide
node_listalgo -->|"operates on"| node_linked
node_stackdemo -->|"calls"| node_stack
node_queuedemo -->|"calls"| node_queue
node_heapdemo -->|"calls"| node_heap
node_treedemo -->|"calls"| node_trees

click node_arrays "https://github.com/wangzheng0822/algo/blob/master/java/05_array/Array.java"
click node_linked "https://github.com/wangzheng0822/algo/blob/master/php/06_linkedlist/SingleLinkedList.php"
click node_listalgo "https://github.com/wangzheng0822/algo/blob/master/php/07_linkedlist/main.php"
click node_stack "https://github.com/wangzheng0822/algo/blob/master/php/08_stack/StackOnLinkedList.php"
click node_stackdemo "https://github.com/wangzheng0822/algo/blob/master/php/08_stack/main.php"
click node_queue "https://github.com/wangzheng0822/algo/blob/master/php/09_queue/QueueOnLinkedList.php"
click node_queuedemo "https://github.com/wangzheng0822/algo/blob/master/php/09_queue/main.php"
click node_sorting "https://github.com/wangzheng0822/algo/blob/master/java/12_sorts/Sorts.java"
click node_search "https://github.com/wangzheng0822/algo/blob/master/python/16_bsearch/bsearch_variants.py"
click node_hashing "https://github.com/wangzheng0822/algo/blob/master/java/18_hashtable/HashTable.java"
click node_lru "https://github.com/wangzheng0822/algo/blob/master/java/20_hashtable/LRUBaseHashTable.java"
click node_skiplist "https://github.com/wangzheng0822/algo/blob/master/java/17_skiplist/SkipList.java"
click node_trie "https://github.com/wangzheng0822/algo/blob/master/python/35_trie/trie_.py"
click node_heap "https://github.com/wangzheng0822/algo/blob/master/php/10_heap/Heap.php"
click node_heapdemo "https://github.com/wangzheng0822/algo/blob/master/php/10_heap/main.php"
click node_trees "https://github.com/wangzheng0822/algo/blob/master/php/24_tree/Tree.php"
click node_treedemo "https://github.com/wangzheng0822/algo/blob/master/php/24_tree/main.php"
click node_bst "https://github.com/wangzheng0822/algo/blob/master/c-cpp/24_binarysearchtree/binarysearchtree.h"
click node_graph "https://github.com/wangzheng0822/algo/blob/master/python/44_shortest_path/dijkstra.py"
click node_backtracking "https://github.com/wangzheng0822/algo/blob/master/python/39_back_track/eight_queens.py"
click node_dynamic "https://github.com/wangzheng0822/algo/blob/master/python/41_dynamic_programming/coins_problem.py"
click node_recursion "https://github.com/wangzheng0822/algo/blob/master/go/10_recursion/Fibonacci.go"
click node_divide "https://github.com/wangzheng0822/algo/blob/master/python/38_divide_and_conquer/merge_sort_counting.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_arrays,node_linked,node_listalgo,node_stack,node_stackdemo,node_queue,node_queuedemo toneBlue
class node_sorting,node_search toneAmber
class node_hashing,node_lru,node_skiplist,node_trie,node_heap,node_heapdemo toneMint
class node_trees,node_treedemo,node_bst,node_graph toneRose
class node_backtracking,node_dynamic,node_recursion,node_divide,node_learner toneIndigo
```

## Components

### Linear structures

- [Arrays](https://github.com/wangzheng0822/algo/blob/master/java/05_array/Array.java): `java/05_array/Array.java`
- [Linked lists](https://github.com/wangzheng0822/algo/blob/master/php/06_linkedlist/SingleLinkedList.php): `php/06_linkedlist/SingleLinkedList.php`
- [List algorithms](https://github.com/wangzheng0822/algo/blob/master/php/07_linkedlist/main.php): `php/07_linkedlist/main.php`
- [Stacks](https://github.com/wangzheng0822/algo/blob/master/php/08_stack/StackOnLinkedList.php): `php/08_stack/StackOnLinkedList.php`
- [Stack example](https://github.com/wangzheng0822/algo/blob/master/php/08_stack/main.php): `php/08_stack/main.php`
- [Queues](https://github.com/wangzheng0822/algo/blob/master/php/09_queue/QueueOnLinkedList.php): `php/09_queue/QueueOnLinkedList.php`
- [Queue example](https://github.com/wangzheng0822/algo/blob/master/php/09_queue/main.php): `php/09_queue/main.php`

### Ordering and search

- [Sorting](https://github.com/wangzheng0822/algo/blob/master/java/12_sorts/Sorts.java): `java/12_sorts/Sorts.java`
- [Binary search](https://github.com/wangzheng0822/algo/blob/master/python/16_bsearch/bsearch_variants.py): `python/16_bsearch/bsearch_variants.py`

### Indexed structures

- [Hash tables](https://github.com/wangzheng0822/algo/blob/master/java/18_hashtable/HashTable.java): `java/18_hashtable/HashTable.java`
- [LRU caches](https://github.com/wangzheng0822/algo/blob/master/java/20_hashtable/LRUBaseHashTable.java): `java/20_hashtable/LRUBaseHashTable.java`
- [Skip lists](https://github.com/wangzheng0822/algo/blob/master/java/17_skiplist/SkipList.java): `java/17_skiplist/SkipList.java`
- [Trie and matching](https://github.com/wangzheng0822/algo/blob/master/python/35_trie/trie_.py): `python/35_trie/trie_.py`
- [Heap](https://github.com/wangzheng0822/algo/blob/master/php/10_heap/Heap.php): `php/10_heap/Heap.php`
- [Heap example](https://github.com/wangzheng0822/algo/blob/master/php/10_heap/main.php): `php/10_heap/main.php`

### Trees and graphs

- [Binary trees](https://github.com/wangzheng0822/algo/blob/master/php/24_tree/Tree.php): `php/24_tree/Tree.php`
- [Tree example](https://github.com/wangzheng0822/algo/blob/master/php/24_tree/main.php): `php/24_tree/main.php`
- [Search trees](https://github.com/wangzheng0822/algo/blob/master/c-cpp/24_binarysearchtree/binarysearchtree.h): `c-cpp/24_binarysearchtree/binarysearchtree.h`
- [Graph algorithms](https://github.com/wangzheng0822/algo/blob/master/python/44_shortest_path/dijkstra.py): `python/44_shortest_path/dijkstra.py`

### Algorithmic problems

- [Backtracking](https://github.com/wangzheng0822/algo/blob/master/python/39_back_track/eight_queens.py): `python/39_back_track/eight_queens.py`
- [Dynamic programming](https://github.com/wangzheng0822/algo/blob/master/python/41_dynamic_programming/coins_problem.py): `python/41_dynamic_programming/coins_problem.py`
- [Recursion](https://github.com/wangzheng0822/algo/blob/master/go/10_recursion/Fibonacci.go): `go/10_recursion/Fibonacci.go`
- [Divide and conquer](https://github.com/wangzheng0822/algo/blob/master/python/38_divide_and_conquer/merge_sort_counting.py): `python/38_divide_and_conquer/merge_sort_counting.py`

### Other components

- **Learner**

## Connections

- Learner → Arrays: explores
- Learner → Linked lists: explores
- Learner → Stacks: explores
- Learner → Queues: explores
- Learner → Sorting: explores
- Learner → Binary search: explores
- Learner → Hash tables: explores
- Learner → Heap: explores
- Learner → Binary trees: explores
- Learner → Graph algorithms: explores
- Learner → Backtracking: explores
- Learner → Dynamic programming: explores
- Learner → Recursion: explores
- Learner → Divide and conquer: explores
- List algorithms → Linked lists: operates on (evidence: `php/07_linkedlist/main.php`)
- Stack example → Stacks: calls (evidence: `php/08_stack/main.php`)
- Queue example → Queues: calls (evidence: `php/09_queue/main.php`)
- Heap example → Heap: calls (evidence: `php/10_heap/main.php`)
- Tree example → Binary trees: calls (evidence: `php/24_tree/main.php`)
