# tadaoh/data-and-algo architecture

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

- Interactive diagram: https://gitdiagram.com/tadaoh/data-and-algo
- Repository: https://github.com/tadaoh/data-and-algo

## Overview

This repository is a small C++ collection of sorting algorithms, a permutation-printing program, and reusable data structures. A user supplies values to a sorting routine and receives the reordered vector; the permutation program reads n and prints permutations. The map and set provide ordered key-based containers backed by AVL trees, while pair provides a comparable two-value type. The tree lists modular map implementation files as well as an all-in-one version. The graph reflects documented capabilities and sampled interfaces; unsampled implementation details and uncertain wiring are omitted.

Main entry points: [`data_structure/map_avl/zzz_hh_map_avl.h`](https://github.com/tadaoh/data-and-algo/blob/main/data_structure/map_avl/zzz_hh_map_avl.h) (Map Interface), [`algorithm/brute_force/permutation.cpp`](https://github.com/tadaoh/data-and-algo/blob/main/algorithm/brute_force/permutation.cpp) (Permutation Program), [`data_structure/pair/zzz_hh_pair.h`](https://github.com/tadaoh/data-and-algo/blob/main/data_structure/pair/zzz_hh_pair.h) (Pair Declaration), [`data_structure/pair/zzz_pair.h`](https://github.com/tadaoh/data-and-algo/blob/main/data_structure/pair/zzz_pair.h) (Pair Operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_algorithms["Algorithms"]
  node_insertion["Insertion Sort<br/>[insertion_sort.h]"]
  node_heap["Heap Sort<br/>[heap_sort.h]"]
  node_selection["Selection Sort<br/>[selection_sort.h]"]
  node_permutation["Permutation Program<br/>[permutation.cpp]"]
end

subgraph group_containers["AVL Containers"]
  node_map["AVL Map"]
  node_set["AVL Set"]
end

subgraph group_pair["Pair Type"]
  node_pair_decl["Pair Declaration<br/>[zzz_hh_pair.h]"]
  node_pair_impl["Pair Operations<br/>[zzz_pair.h]"]
end

subgraph group_map_impl["Map Implementation"]
  node_map_decl["Map Interface<br/>[zzz_hh_map_avl.h]"]
  node_map_ops["Map Operations"]
  node_map_iter["Map Iterators"]
  node_map_rev_iter["Reverse Iterators"]
end

node_user(("User"))
node_console(("Console Output"))

node_user -->|"provides vector"| node_insertion
node_user -->|"provides vector"| node_heap
node_user -->|"provides vector"| node_selection
node_user -->|"enters n"| node_permutation
node_permutation -->|"prints permutations"| node_console
node_user -->|"uses container"| node_map
node_user -->|"uses container"| node_set
node_user -->|"uses type"| node_pair_decl
node_pair_impl -->|"defines operations"| node_pair_decl
node_map_ops -->|"implements operations"| node_map_decl
node_map_iter -->|"implements traversal"| node_map_decl
node_map_rev_iter -->|"implements reverse traversal"| node_map_decl

click node_insertion "https://github.com/tadaoh/data-and-algo/blob/main/algorithm/sort/insertion_sort.h"
click node_heap "https://github.com/tadaoh/data-and-algo/blob/main/algorithm/sort/heap_sort.h"
click node_selection "https://github.com/tadaoh/data-and-algo/blob/main/algorithm/sort/selection_sort.h"
click node_permutation "https://github.com/tadaoh/data-and-algo/blob/main/algorithm/brute_force/permutation.cpp"
click node_map "https://github.com/tadaoh/data-and-algo/blob/main/data_structure/map_avl/all_in_one_map_avl.h"
click node_set "https://github.com/tadaoh/data-and-algo/blob/main/data_structure/set_avl/set_avl_all_in_one.h"
click node_map_decl "https://github.com/tadaoh/data-and-algo/blob/main/data_structure/map_avl/zzz_hh_map_avl.h"
click node_map_ops "https://github.com/tadaoh/data-and-algo/blob/main/data_structure/map_avl/zzz_map_avl_find_insert_erase.h"
click node_map_iter "https://github.com/tadaoh/data-and-algo/blob/main/data_structure/map_avl/zzz_map_avl_iterator.h"
click node_map_rev_iter "https://github.com/tadaoh/data-and-algo/blob/main/data_structure/map_avl/zzz_map_avl_reverse_iterator.h"
click node_pair_decl "https://github.com/tadaoh/data-and-algo/blob/main/data_structure/pair/zzz_hh_pair.h"
click node_pair_impl "https://github.com/tadaoh/data-and-algo/blob/main/data_structure/pair/zzz_pair.h"

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_insertion,node_heap,node_selection,node_permutation,node_user toneBlue
class node_map,node_set toneAmber
class node_pair_decl,node_pair_impl toneMint
class node_map_decl,node_map_ops,node_map_iter,node_map_rev_iter toneRose
class node_console toneIndigo
```

## Components

### Algorithms

- [Insertion Sort](https://github.com/tadaoh/data-and-algo/blob/main/algorithm/sort/insertion_sort.h): `algorithm/sort/insertion_sort.h`
- [Heap Sort](https://github.com/tadaoh/data-and-algo/blob/main/algorithm/sort/heap_sort.h): `algorithm/sort/heap_sort.h`
- [Selection Sort](https://github.com/tadaoh/data-and-algo/blob/main/algorithm/sort/selection_sort.h): `algorithm/sort/selection_sort.h`
- [Permutation Program](https://github.com/tadaoh/data-and-algo/blob/main/algorithm/brute_force/permutation.cpp): `algorithm/brute_force/permutation.cpp`

### AVL Containers

- [AVL Map](https://github.com/tadaoh/data-and-algo/blob/main/data_structure/map_avl/all_in_one_map_avl.h): `data_structure/map_avl/all_in_one_map_avl.h`
- [AVL Set](https://github.com/tadaoh/data-and-algo/blob/main/data_structure/set_avl/set_avl_all_in_one.h): `data_structure/set_avl/set_avl_all_in_one.h`

### Pair Type

- [Pair Declaration](https://github.com/tadaoh/data-and-algo/blob/main/data_structure/pair/zzz_hh_pair.h): `data_structure/pair/zzz_hh_pair.h`
- [Pair Operations](https://github.com/tadaoh/data-and-algo/blob/main/data_structure/pair/zzz_pair.h): `data_structure/pair/zzz_pair.h`

### Map Implementation

- [Map Interface](https://github.com/tadaoh/data-and-algo/blob/main/data_structure/map_avl/zzz_hh_map_avl.h): `data_structure/map_avl/zzz_hh_map_avl.h`
- [Map Operations](https://github.com/tadaoh/data-and-algo/blob/main/data_structure/map_avl/zzz_map_avl_find_insert_erase.h): `data_structure/map_avl/zzz_map_avl_find_insert_erase.h`
- [Map Iterators](https://github.com/tadaoh/data-and-algo/blob/main/data_structure/map_avl/zzz_map_avl_iterator.h): `data_structure/map_avl/zzz_map_avl_iterator.h`
- [Reverse Iterators](https://github.com/tadaoh/data-and-algo/blob/main/data_structure/map_avl/zzz_map_avl_reverse_iterator.h): `data_structure/map_avl/zzz_map_avl_reverse_iterator.h`

### Other components

- **User**
- **Console Output**

## Connections

- User → Insertion Sort: provides vector
- User → Heap Sort: provides vector
- User → Selection Sort: provides vector
- User → Permutation Program: enters n
- Permutation Program → Console Output: prints permutations
- User → AVL Map: uses container
- User → AVL Set: uses container
- User → Pair Declaration: uses type
- Pair Operations → Pair Declaration: defines operations
- Map Operations → Map Interface: implements operations
- Map Iterators → Map Interface: implements traversal
- Reverse Iterators → Map Interface: implements reverse traversal
