A High-Performance C++ Analysis Suite for Data Structures & Big O Complexity
The Algorithmic Efficiency Lab is a professional-grade C++ project designed to explore the boundaries of computational performance. By implementing core data structures from scratch and benchmarking sorting algorithms, this lab provides deep insights into low-level logic, manual memory management, and algorithmic scaling.
Below is a terminal capture demonstrating the efficiency gap between
========================================
Algorithmic Efficiency Lab
========================================
--- Testing Data Structures ---
[PASSED] Linked List: 5 -> 10 -> 20 -> NULL
[PASSED] Stack (LIFO): Popped: 3, Top now: 2
[PASSED] Queue (FIFO): Dequeued: 100, Front now: 200
[PASSED] BST (Inorder): 20 30 50 70
--- Big O Analysis (Data Size: 1,000) ---
Bubble Sort : 3.277 ms [O(n^2)]
Merge Sort : 0.294 ms [O(n log n)]
Quick Sort : 0.095 ms [O(n log n)]
STL Sort : 0.077 ms [Optimized]
--- Big O Analysis (Data Size: 5,000) ---
Bubble Sort : 87.349 ms [O(n^2)]
Merge Sort : 1.814 ms [O(n log n)]
Quick Sort : 0.626 ms [O(n log n)]
STL Sort : 0.587 ms [Optimized]
Lab execution complete. Clean memory exit.
- Custom Data Structures: Hand-coded
LinkedList,Stack,Queue, andBinary Search Treewith explicit pointer manipulation. - Manual Memory Management: Robust constructors/destructors to ensure zero memory leaks during heap allocation.
- Complexity Benchmarking: Comparative analysis using high-precision timers (
<chrono>) to visualize Big O scaling. - Generic Programming: Fully templated classes for type-agnostic performance.
- Languages: C++17
- Compilers: MSVC (cl.exe) / GCC (g++)
- Tools: GDB Debugger, Make, Git
- Standard Library: Used solely for benchmarking and timing comparison.
- A C++17 compliant compiler installed (Visual Studio or MinGW).
- Clone the repository.
- Build the project:
g++ -Iinclude main.cpp -o lab_exec.exe
- Run Benchmarks:
./lab_exec.exe
In modern software engineering, reliance on high-level libraries often masks the underlying cost of data manipulation. I developed this lab to bridge that gap. By building these structures without STL containers, I've mastered the intricacies of heap allocation, recursive tree traversals, and the mathematical reality of algorithmic growth. This project serves as a testament to writing code that is not just functional, but optimized for scale.
Developed with a focus on Low-Level Systems and Algorithmic Optimization.