Data Structures, Algorithms & ADT Playbench
Implementation and visualization of sorting algorithms in C++ and Python, Sorting Algorithms and Abstract Data Types. Algorithms as c++ templates.
Queue
Ring Queue
Stack
Linked List Stack
Binary Tree
Algorithm
avg time
worst time
best time
space
Linear Search
O(n)
O(n)
O(1)
O(1)
Binary Search
O(log(n))
OO(log(n))
O(1)
O(1)
Algorithm
avg time
worst time
best time
space
Bubble Sort
O(n2 )
O(n2 )
O(n)
O(1)
Selection Sort
O(n2 )
O(n2 )
O(n2 )
O(1)
Insertion Sort
O(n2 )
O(n2 )
O(n)
O(1)
Merge Sort
O(nlog(n))
O(nlog(n))
O(nlog(n))
O(n)
Quick Sort
O(nlog(n))
O(n2 )
O(nlog(n))
O(log(n))
Heap Sort
O(nlog(n))
O(nlog(n))
O(nlog(n))
O(log(n))
Get Google Test lib: sudo apt install libgtest-dev
Create and go to /build (from main folder):
Generate build files: cmake ..
Compie: make
Available tests:
./adt_test
./searching_test`
./sorting_test
Venv Build:
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Navigate to Tests/sorting: cd Tests/sorting
Run Python script: python timeComparement.py
Plots are in: Tests/sorting/data