Low-level C implementations of classic data structures and algorithms, written for study, experimentation and long-term technical reference.
⚠️ This project is intentionally low-level and explicit, focusing on memory, pointers, and internal behavior — not abstraction or frameworks.
This repository is a collection of hand-crafted data structures and algorithms in C, originally built for learning and later refactored with:
- safer memory handling
- better modularization
- Doxygen documentation
- improved portability (Linux / BSD)
It represents foundational work in:
- Pointers and memory management
- Manual data structure implementation
- Algorithmic thinking
- Low-level debugging mindset
fire_queue→ FIFO queuefire_stack→ LIFO stackfire_doubly_linked_list→ bidirectional list with positional accessfire_vector→ dynamic arrayfire_narytree→ tree using child/sibling representation
arit_eval→ arithmetic expression parser + evaluator (with overflow-safe operations)
fire_graph- weighted directed graph
- dynamic adjacency structure
- Bellman-Ford (shortest path)
- Floyd-Warshall (all-pairs shortest path)
- negative cycle detection
- path reconstruction
Graph edges:
A -> B (6)
A -> C (2)
C -> D (3)
D -> B (-2)
B -> E (1)
E -> H (2)
H -> I (1)
I -> J (-2)
Shortest route from A to J:
A -> C -> D -> B -> E -> H -> I -> J
Total cost: 5
Each module is independent:
make -C fire_queue
make -C fire_stack
make -C fire_doubly_linked_list
make -C fire_narytree
make -C fire_vector
make -C arit_eval
make -C fire_graph./fire_graph/bin/test_graphGenerate full documentation:
sudo dnf install doxygen graphviz
doxygen Doxyfile
xdg-open docs/html/index.htmlIncludes:
- API documentation
- internal implementation notes
- module pages
- real usage examples
This project intentionally avoids:
- STL-like abstractions
- hidden allocations
- magic behavior
Instead, it focuses on:
- explicit memory ownership
- predictable behavior
- debuggability
- portability
- No unchecked arithmetic (arit_eval uses safe operations)
- Explicit frees in all modules
- Bounded structures (graph limits, queue safety)
- Defensive programming style
- Audit resources with Valgrind(audit Heap for leaks) and cppchecker(SAST)
This is not meant to be:
❌ production-ready library
❌ optimized for performance
❌ generic framework
This is:
✅ a study of fundamentals
✅ a reference for low-level C
✅ proof of hands-on systems knowledge
- Dijkstra implementation
- graph serialization
- stress tests
- optional lock-free structures
Note, the path "src/main.c" its a complete example to use each module.
Solitude_of_fire/
├── arit_eval
│ ├── audit_log
│ │ ├── audit_heap.txt
│ │ └── log_cppcheck.txt
│ ├── bin
│ │ └── arit_eval
│ ├── LICENSE
│ ├── Makefile
│ └── src
│ ├── arithmetic_eval.c
│ ├── arithmetic_eval.h
│ ├── AST.c
│ ├── AST.h
│ ├── global.h
│ ├── main.c
│ ├── parser.c
│ ├── parser.h
│ ├── secure_operation.c
│ └── secure_operation.h
├── docs
│ ├── arit_eval_page.dox
│ ├── fire_dll_page.dox
│ ├── fire_graph_page.dox
│ ├── fire_queue_page.dox
│ ├── fire_stack_page.dox
│ ├── fire_tree_page.dox
│ ├── fire_vector_page.dox
│ ├── html
│ └── mainpage.dox...
├── Doxyfile
├── fire_doubly_linked_list
│ ├── audit_log
│ │ ├── audit_heap.txt
│ │ └── log_cppcheck.txt
│ ├── bin
│ │ └── test_doubly_linked
│ ├── lib
│ │ ├── fire_doubly_linked.c
│ │ └── fire_doubly_linked.h
│ ├── LICENSE
│ ├── Makefile
│ └── src
│ └── main.c
├── fire_graph
│ ├── bin
│ │ └── test_graph
│ ├── lib
│ │ ├── fire_graph.c
│ │ └── fire_graph.h
│ ├── log_audit
│ │ ├── log_cppcheck.txt
│ │ └── log_valgrind.txt
│ ├── Makefile
│ └── src
│ └── main.c
├── fire_narytree
│ ├── audit_log
│ │ ├── audit_heap.txt
│ │ └── log_cppcheck.txt
│ ├── bin
│ │ └── test_tree
│ ├── lib
│ │ ├── fire_narytree.c
│ │ └── fire_narytree.h
│ ├── LICENSE
│ ├── Makefile
│ └── src
│ └── main.c
├── fire_queue
│ ├── audit_log
│ │ ├── audit_heap.txt
│ │ └── log_cppcheck.txt
│ ├── bin
│ │ └── test_queue
│ ├── lib
│ │ ├── fire_queue.c
│ │ └── fire_queue.h
│ ├── LICENSE
│ ├── Makefile
│ └── src
│ └── main.c
├── fire_stack
│ ├── audit_log
│ │ ├── audit_heap.txt
│ │ └── log_cppcheck.txt
│ ├── bin
│ │ └── test_stack
│ ├── lib
│ │ ├── fire_stack.c
│ │ └── fire_stack.h
│ ├── LICENSE
│ ├── Makefile
│ └── src
│ └── main.c
├── fire_vector
│ ├── audit_log
│ │ ├── audit_heap.txt
│ │ └── log_cppcheck.txt
│ ├── bin_test
│ │ └── fire_vector_test
│ ├── lib
│ │ ├── fire_vector.c
│ │ ├── fire_vector.h
│ │ ├── mem_ops.c
│ │ └── mem_ops.h
│ ├── LICENSE
│ ├── Makefile
│ └── src_test
│ └── main.c
├── LICENSE
└── README.md
38 directories, 321 files
sudo dnf install doxygen graphviz
doxygen Doxyfile
xdg-open docs/html/index.htmlUsed tools valgrind and cppcheck:
cppcheck \
--enable=all \
--inconclusive \
--std=c11 \
--force \
--check-level=exhaustive \
--inline-suppr \
--suppress=missingIncludeSystem \
-I. \
. 2 > log_cppcheck.txt
Example: https://github.com/Orangewarrior/Solitude_of_fire/tree/main/fire_doubly_linked_list/audit_log
Orangewarrior