# gotfridvadim-pixel/algorithms-and-data-structures architecture

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

- Interactive diagram: https://gitdiagram.com/gotfridvadim-pixel/algorithms-and-data-structures
- Repository: https://github.com/gotfridvadim-pixel/algorithms-and-data-structures

## Overview

This repository is a collection of independent algorithms-and-data-structures coursework programs, plus a reusable hash-table implementation. The README highlights sorting, binary search, and stack/queue/deque exercises; the tree also contains heap and binary-search-tree exercises. There is no shared application workflow across the labs. The shown command-line examples read input and print results; the hash-table demo constructs and displays a table. Relationships for unsampled exercises are omitted rather than inferred.

Main entry points: [`HashTableCoursework/main.py`](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/HashTableCoursework/main.py) (Hash-table demo), [`HashTableCoursework/hash_table.py`](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/HashTableCoursework/hash_table.py) (HashTable), [`lab1/e.cpp`](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab1/e.cpp) (Merge sort), [`lab2/a/a.cpp`](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab2/a/a.cpp) (Binary search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_hash["Hash table"]
  node_hash_demo["Hash-table demo<br/>[main.py]"]
  node_hash_table["HashTable<br/>[hash_table.py]"]
  node_hash_functions["Hash functions<br/>[hash_functions.py]"]
end

subgraph group_sorting["Sorting"]
  node_sort_exercises["Sorting exercises"]
  node_merge_sort["Merge sort<br/>[e.cpp]"]
end

subgraph group_search["Binary search"]
  node_search_exercises["Search exercises"]
  node_binary_search["Binary search<br/>[a.cpp]"]
  node_nearest_search["Nearest value search<br/>[b.cpp]"]
  node_range_count["Range counting<br/>[i.py]"]
end

subgraph group_containers["Containers"]
  node_container_exercises["Container exercises"]
  node_deque["Deque commands<br/>[e.py]"]
end

subgraph group_heaps["Heaps"]
  node_heap_exercises["Heap exercises"]
  node_min_heap_sort["Min-heap sort<br/>[b.py]"]
  node_max_heap_commands["Max-heap commands<br/>[d.cpp]"]
  node_min_heap_commands["Min-heap commands<br/>[c.cpp]"]
end

subgraph group_trees["Search trees"]
  node_tree_exercises["Tree exercises"]
  node_binary_tree["Binary search tree<br/>[a.py]"]
end

node_user(("Command-line user"))

node_user -->|"runs demo"| node_hash_demo
node_hash_demo -->|"creates and updates"| node_hash_table
node_hash_demo -->|"uses hash"| node_hash_functions
node_hash_table -->|"imports hash"| node_hash_functions
node_user -->|"provides input"| node_merge_sort
node_merge_sort -->|"prints sorted values"| node_user
node_user -->|"provides input"| node_binary_search
node_binary_search -->|"prints membership"| node_user
node_user -->|"provides input"| node_nearest_search
node_nearest_search -->|"prints nearest values"| node_user
node_user -->|"provides input"| node_range_count
node_range_count -->|"prints counts"| node_user
node_user -->|"sends commands"| node_deque
node_deque -->|"prints responses"| node_user
node_user -->|"provides values"| node_min_heap_sort
node_min_heap_sort -->|"prints sorted values"| node_user
node_user -->|"sends commands"| node_max_heap_commands
node_max_heap_commands -->|"prints extraction"| node_user
node_user -->|"sends commands"| node_min_heap_commands
node_min_heap_commands -->|"prints extraction"| node_user
node_user -->|"sends commands"| node_binary_tree
node_binary_tree -->|"prints results"| node_user

click node_hash_demo "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/HashTableCoursework/main.py"
click node_hash_table "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/HashTableCoursework/hash_table.py"
click node_hash_functions "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/HashTableCoursework/hash_functions.py"
click node_sort_exercises "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/tree/main/lab1"
click node_merge_sort "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab1/e.cpp"
click node_search_exercises "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/tree/main/lab2"
click node_binary_search "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab2/a/a.cpp"
click node_nearest_search "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab2/b/b.cpp"
click node_range_count "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab2/i.py"
click node_container_exercises "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/tree/main/lab3"
click node_deque "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab3/e.py"
click node_heap_exercises "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/tree/main/lab4"
click node_min_heap_sort "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab4/b.py"
click node_max_heap_commands "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab4/d/d.cpp"
click node_min_heap_commands "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab4/%D1%81/c.cpp"
click node_tree_exercises "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/tree/main/lab5"
click node_binary_tree "https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab5/a.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_hash_demo,node_hash_table,node_hash_functions,node_user toneBlue
class node_sort_exercises,node_merge_sort toneAmber
class node_search_exercises,node_binary_search,node_nearest_search,node_range_count toneMint
class node_container_exercises,node_deque toneRose
class node_heap_exercises,node_min_heap_sort,node_max_heap_commands,node_min_heap_commands toneIndigo
class node_tree_exercises,node_binary_tree toneTeal
```

## Components

### Hash table

- [Hash-table demo](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/HashTableCoursework/main.py): `HashTableCoursework/main.py`
- [HashTable](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/HashTableCoursework/hash_table.py): `HashTableCoursework/hash_table.py`
- [Hash functions](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/HashTableCoursework/hash_functions.py): `HashTableCoursework/hash_functions.py`

### Sorting

- [Sorting exercises](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/tree/main/lab1): `lab1`
- [Merge sort](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab1/e.cpp): `lab1/e.cpp`

### Binary search

- [Search exercises](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/tree/main/lab2): `lab2`
- [Binary search](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab2/a/a.cpp): `lab2/a/a.cpp`
- [Nearest value search](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab2/b/b.cpp): `lab2/b/b.cpp`
- [Range counting](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab2/i.py): `lab2/i.py`

### Containers

- [Container exercises](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/tree/main/lab3): `lab3`
- [Deque commands](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab3/e.py): `lab3/e.py`

### Heaps

- [Heap exercises](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/tree/main/lab4): `lab4`
- [Min-heap sort](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab4/b.py): `lab4/b.py`
- [Max-heap commands](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab4/d/d.cpp): `lab4/d/d.cpp`
- [Min-heap commands](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab4/%D1%81/c.cpp): `lab4/с/c.cpp`

### Search trees

- [Tree exercises](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/tree/main/lab5): `lab5`
- [Binary search tree](https://github.com/gotfridvadim-pixel/algorithms-and-data-structures/blob/main/lab5/a.py): `lab5/a.py`

### Other components

- **Command-line user**

## Connections

- Command-line user → Hash-table demo: runs demo (evidence: `HashTableCoursework/main.py`)
- Hash-table demo → HashTable: creates and updates (evidence: `HashTableCoursework/main.py`)
- Hash-table demo → Hash functions: uses hash (evidence: `HashTableCoursework/main.py`)
- HashTable → Hash functions: imports hash (evidence: `HashTableCoursework/hash_table.py`)
- Command-line user → Merge sort: provides input (evidence: `lab1/e.cpp`)
- Merge sort → Command-line user: prints sorted values (evidence: `lab1/e.cpp`)
- Command-line user → Binary search: provides input (evidence: `lab2/a/a.cpp`)
- Binary search → Command-line user: prints membership (evidence: `lab2/a/a.cpp`)
- Command-line user → Nearest value search: provides input (evidence: `lab2/b/b.cpp`)
- Nearest value search → Command-line user: prints nearest values (evidence: `lab2/b/b.cpp`)
- Command-line user → Range counting: provides input (evidence: `lab2/i.py`)
- Range counting → Command-line user: prints counts (evidence: `lab2/i.py`)
- Command-line user → Deque commands: sends commands (evidence: `lab3/e.py`)
- Deque commands → Command-line user: prints responses (evidence: `lab3/e.py`)
- Command-line user → Min-heap sort: provides values (evidence: `lab4/b.py`)
- Min-heap sort → Command-line user: prints sorted values (evidence: `lab4/b.py`)
- Command-line user → Max-heap commands: sends commands (evidence: `lab4/d/d.cpp`)
- Max-heap commands → Command-line user: prints extraction (evidence: `lab4/d/d.cpp`)
- Command-line user → Min-heap commands: sends commands (evidence: `lab4/с/c.cpp`)
- Min-heap commands → Command-line user: prints extraction (evidence: `lab4/с/c.cpp`)
- Command-line user → Binary search tree: sends commands (evidence: `lab5/a.py`)
- Binary search tree → Command-line user: prints results (evidence: `lab5/a.py`)
