Algorithms
This repo contains all existing types of Algorithms implemented in C++
1. Searching
2. Sorting
Sorting Technique |
Complexity(Worst Case) |
Link |
Method |
Stable |
Class |
Selection |
O(n^2) |
Selection Sort |
Selection |
No |
Comparison Sort |
Insertion |
O(n^2) |
Insertion Sort |
Insertion |
Yes |
Comparison Sort |
Counting |
O(n + k) |
Counting Sort |
- |
Yes |
Non-Comparison Sort |
Quick |
O(n log n) |
Quick Sort |
Partitioning |
No |
Comparison Sort |
Bubble |
O(n^2) |
Bubble Sort |
Exchanging |
Yes |
Comparison |
Merge Sort |
O(n log n) |
Merge Sort |
Merging |
Yes |
- |
3. Pattern Matching
Technique |
Complexity(Worst Case) |
Link |
Knuth-Morris-Pratt |
O(n+m) |
KMP |
4. Dynamic Programming
Technique |
Complexity(Worst Case) |
Link |
Fibonacci |
O(n) |
fibonacci |
5. Divide & Conquer
License
MIT License
Contribution
See CONTRIBUTING file for contributing.
All the Algorithms have been complied using GCC 8.1.0 (MinGW) on a Winodws Machine & GCC 8.2.0 on Ubuntu (Mate) Machine.