C++ implementations of common sorting, searching, and recurrence-analysis problems used while practicing DAA fundamentals.
| File | Topic |
|---|---|
binarysearch.cpp |
Binary search on sorted input |
heap.cpp |
Heap sort |
mergesort.cpp |
Merge sort |
quicksort.cpp |
Quick sort |
MasterMethod.cpp |
Master theorem case calculator |
Use any C++17-compatible compiler. Example with g++:
g++ -std=c++17 binarysearch.cpp -o binarysearch
./binarysearchReplace the file name for the algorithm you want to run:
g++ -std=c++17 mergesort.cpp -o mergesort
./mergesort- The programs are interactive and read input from the terminal.
- Compiled binaries are intentionally ignored; build them locally when needed.