# r15h1-201/dsa-in-c architecture

> Architecture diagram of the GitHub repository r15h1-201/dsa-in-c, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/r15h1-201/dsa-in-c
- Repository: https://github.com/r15h1-201/dsa-in-c

## Overview

Allsort is a small interactive C sorting program: the user enters an array, selects an algorithm, and sees the sorted values and complexity information. The single source file owns input, menu dispatch, the five algorithms, and output; the graph keeps these distinct runtime responsibilities visible without implying they are separate modules. Relationships shown are explicit calls or menu dispatches in the excerpt. There are no external services or persistent stores.

Main entry points: [`allsort.c`](https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c) (Algorithm menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflow"]
  node_input["Array input<br/>[allsort.c]"]
  node_menu["Algorithm menu<br/>[allsort.c]"]
  node_output["Results display<br/>[allsort.c]"]
end

subgraph group_algorithms["Sorting algorithms"]
  node_bubble["Bubble sort<br/>[allsort.c]"]
  node_insertion["Insertion sort<br/>[allsort.c]"]
  node_selection["Selection sort<br/>[allsort.c]"]
  node_merge["Merge sort<br/>[allsort.c]"]
  node_quick["Quick sort<br/>[allsort.c]"]
end

node_user(("User"))

node_user -->|"enters values"| node_input
node_input -->|"continues to"| node_menu
node_user -->|"chooses method"| node_menu
node_menu -->|"dispatches"| node_bubble
node_menu -->|"dispatches"| node_insertion
node_menu -->|"dispatches"| node_selection
node_menu -->|"dispatches"| node_merge
node_menu -->|"dispatches"| node_quick
node_menu -->|"displays results"| node_output
node_user -->|"views output"| node_output

click node_input "https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c"
click node_menu "https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c"
click node_bubble "https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c"
click node_insertion "https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c"
click node_selection "https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c"
click node_merge "https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c"
click node_quick "https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c"
click node_output "https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c"

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_input,node_menu,node_output,node_user toneBlue
class node_bubble,node_insertion,node_selection,node_merge,node_quick toneAmber
```

## Components

### CLI workflow

- [Array input](https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c): `allsort.c`
- [Algorithm menu](https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c): `allsort.c`
- [Results display](https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c): `allsort.c`

### Sorting algorithms

- [Bubble sort](https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c): `allsort.c`
- [Insertion sort](https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c): `allsort.c`
- [Selection sort](https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c): `allsort.c`
- [Merge sort](https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c): `allsort.c`
- [Quick sort](https://github.com/r15h1-201/dsa-in-c/blob/main/allsort.c): `allsort.c`

### Other components

- **User**

## Connections

- User → Array input: enters values (evidence: `allsort.c`)
- Array input → Algorithm menu: continues to (evidence: `allsort.c`)
- User → Algorithm menu: chooses method (evidence: `allsort.c`)
- Algorithm menu → Bubble sort: dispatches (evidence: `allsort.c`)
- Algorithm menu → Insertion sort: dispatches (evidence: `allsort.c`)
- Algorithm menu → Selection sort: dispatches (evidence: `allsort.c`)
- Algorithm menu → Merge sort: dispatches (evidence: `allsort.c`)
- Algorithm menu → Quick sort: dispatches (evidence: `allsort.c`)
- Algorithm menu → Results display: displays results (evidence: `allsort.c`)
- User → Results display: views output (evidence: `allsort.c`)
