# williamarnoclement/tp-algo-tri architecture

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

- Interactive diagram: https://gitdiagram.com/williamarnoclement/tp-algo-tri
- Repository: https://github.com/williamarnoclement/tp-algo-tri

## Overview

This repository is an educational Python sorting exercise: users run standalone scripts that generate numeric arrays, sort them with different methods, and print timing measurements. The README also covers array-generation timing, recursion, and Python’s built-in sort. The scripts are independent rather than a shared application; the excerpts show merge sort calling its merge helper, but no cross-script orchestration. The graph preserves the documented exercise areas without implying they form one runtime pipeline.

Main entry points: [`fusion.py`](https://github.com/williamarnoclement/tp-algo-tri/blob/master/fusion.py) (Merge sort), [`range.py`](https://github.com/williamarnoclement/tp-algo-tri/blob/master/range.py) (Array timing), [`selection.py`](https://github.com/williamarnoclement/tp-algo-tri/blob/master/selection.py) (Selection sort), [`insertion.py`](https://github.com/williamarnoclement/tp-algo-tri/blob/master/insertion.py) (Insertion sort)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_benchmarking["Generation benchmarks"]
  node_range["Array timing<br/>[range.py]"]
end

subgraph group_sorting["Sorting exercises"]
  node_selection["Selection sort<br/>[selection.py]"]
  node_insertion["Insertion sort<br/>[insertion.py]"]
  node_merge_sort["Merge sort<br/>[fusion.py]"]
  node_merge["Merge helper<br/>[fusion.py]"]
end

subgraph group_comparison["Recursion and comparison"]
  node_recursion["Factorial recursion<br/>[recursion.py]"]
  node_native_sort["Python sort<br/>[sort.py]"]
end

node_user(("Learner"))

node_user -->|"runs exercise"| node_range
node_user -->|"runs exercise"| node_selection
node_user -->|"runs exercise"| node_insertion
node_user -->|"runs exercise"| node_merge_sort
node_user -->|"runs exercise"| node_recursion
node_user -->|"runs exercise"| node_native_sort
node_merge_sort -->|"calls"| node_merge

click node_range "https://github.com/williamarnoclement/tp-algo-tri/blob/master/range.py"
click node_selection "https://github.com/williamarnoclement/tp-algo-tri/blob/master/selection.py"
click node_insertion "https://github.com/williamarnoclement/tp-algo-tri/blob/master/insertion.py"
click node_merge_sort "https://github.com/williamarnoclement/tp-algo-tri/blob/master/fusion.py"
click node_merge "https://github.com/williamarnoclement/tp-algo-tri/blob/master/fusion.py"
click node_recursion "https://github.com/williamarnoclement/tp-algo-tri/blob/master/recursion.py"
click node_native_sort "https://github.com/williamarnoclement/tp-algo-tri/blob/master/sort.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_range toneBlue
class node_selection,node_insertion,node_merge_sort,node_merge toneAmber
class node_recursion,node_native_sort toneMint
class node_user toneIndigo
```

## Components

### Generation benchmarks

- [Array timing](https://github.com/williamarnoclement/tp-algo-tri/blob/master/range.py): `range.py`

### Sorting exercises

- [Selection sort](https://github.com/williamarnoclement/tp-algo-tri/blob/master/selection.py): `selection.py`
- [Insertion sort](https://github.com/williamarnoclement/tp-algo-tri/blob/master/insertion.py): `insertion.py`
- [Merge sort](https://github.com/williamarnoclement/tp-algo-tri/blob/master/fusion.py): `fusion.py`
- [Merge helper](https://github.com/williamarnoclement/tp-algo-tri/blob/master/fusion.py): `fusion.py`

### Recursion and comparison

- [Factorial recursion](https://github.com/williamarnoclement/tp-algo-tri/blob/master/recursion.py): `recursion.py`
- [Python sort](https://github.com/williamarnoclement/tp-algo-tri/blob/master/sort.py): `sort.py`

### Other components

- **Learner**

## Connections

- Learner → Array timing: runs exercise (evidence: `README.md`)
- Learner → Selection sort: runs exercise (evidence: `README.md`)
- Learner → Insertion sort: runs exercise (evidence: `README.md`)
- Learner → Merge sort: runs exercise (evidence: `README.md`)
- Learner → Factorial recursion: runs exercise (evidence: `README.md`)
- Learner → Python sort: runs exercise (evidence: `README.md`)
- Merge sort → Merge helper: calls (evidence: `fusion.py`)
