# asad-maiga/singlylinkedlist architecture

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

- Interactive diagram: https://gitdiagram.com/asad-maiga/singlylinkedlist
- Repository: https://github.com/asad-maiga/singlylinkedlist

## Overview

This is a small C singly linked-list library with a demonstration program. The demo builds a list, exercises insertion, sorting, printing, rotation, deletion, reversal, and cleanup; the library implements those operations over heap-allocated nodes. The README is empty, so this map follows the sampled C source and does not infer additional capabilities.

Main entry points: [`Scripts/main_singlyLinkedList.c`](https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/main_singlyLinkedList.c) (List demo), [`Scripts/singlyLinkedList.c`](https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c) (Linked list)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_demo["List demo"]
node_list["Linked list<br/>[singlyLinkedList.c]"]
node_node["List node<br/>[singlyLinkedList.c]"]
node_create["Create node<br/>[singlyLinkedList.c]"]
node_insert["Insert nodes<br/>[singlyLinkedList.c]"]
node_sort["Sort list<br/>[singlyLinkedList.c]"]
node_print["Print list<br/>[singlyLinkedList.c]"]
node_rotate["Rotate ends<br/>[singlyLinkedList.c]"]
node_delete["Delete node<br/>[singlyLinkedList.c]"]
node_reverse["Reverse list<br/>[singlyLinkedList.c]"]
node_clear["Free list<br/>[singlyLinkedList.c]"]
node_terminal(("Terminal"))

node_demo -->|"calls"| node_insert
node_demo -->|"calls"| node_sort
node_demo -->|"calls"| node_print
node_demo -->|"calls"| node_rotate
node_demo -->|"calls"| node_delete
node_demo -->|"calls"| node_reverse
node_demo -->|"calls"| node_clear
node_insert -->|"allocates"| node_create
node_create -->|"creates"| node_node
node_insert -->|"updates"| node_list
node_sort -->|"reorders"| node_list
node_print -->|"traverses"| node_list
node_print -->|"prints"| node_terminal
node_rotate -->|"relinks"| node_list
node_delete -->|"removes"| node_list
node_reverse -->|"reverses"| node_list
node_clear -->|"frees"| node_list

click node_demo "https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/main_singlyLinkedList.c"
click node_list "https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c"
click node_node "https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c"
click node_create "https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c"
click node_insert "https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c"
click node_sort "https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c"
click node_print "https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c"
click node_rotate "https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c"
click node_delete "https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c"
click node_reverse "https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c"
click node_clear "https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.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_demo,node_list,node_node,node_create,node_insert,node_sort,node_print,node_rotate,node_delete,node_reverse,node_clear toneTeal
class node_terminal toneIndigo
```

## Components

### Other components

- [List demo](https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/main_singlyLinkedList.c): `Scripts/main_singlyLinkedList.c`
- [Linked list](https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c): `Scripts/singlyLinkedList.c`
- [List node](https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c): `Scripts/singlyLinkedList.c`
- [Create node](https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c): `Scripts/singlyLinkedList.c`
- [Insert nodes](https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c): `Scripts/singlyLinkedList.c`
- [Sort list](https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c): `Scripts/singlyLinkedList.c`
- [Print list](https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c): `Scripts/singlyLinkedList.c`
- [Rotate ends](https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c): `Scripts/singlyLinkedList.c`
- [Delete node](https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c): `Scripts/singlyLinkedList.c`
- [Reverse list](https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c): `Scripts/singlyLinkedList.c`
- [Free list](https://github.com/asad-maiga/singlylinkedlist/blob/main/Scripts/singlyLinkedList.c): `Scripts/singlyLinkedList.c`
- **Terminal**

## Connections

- List demo → Insert nodes: calls
- List demo → Sort list: calls
- List demo → Print list: calls
- List demo → Rotate ends: calls
- List demo → Delete node: calls
- List demo → Reverse list: calls
- List demo → Free list: calls
- Insert nodes → Create node: allocates
- Create node → List node: creates
- Insert nodes → Linked list: updates
- Sort list → Linked list: reorders
- Print list → Linked list: traverses
- Print list → Terminal: prints
- Rotate ends → Linked list: relinks
- Delete node → Linked list: removes
- Reverse list → Linked list: reverses
- Free list → Linked list: frees
