Created
February 24, 2021 16:30
-
-
Save ManojSatishkumar/c575cc1ce7cc39db87191b3938f2960c to your computer and use it in GitHub Desktop.
Here are some for sorting algorithms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Big O | Sorting | |
# Bubble Sort | |
TC -> O(N^2) | |
SC -> O(1) | |
# Insertion Sort | |
TC -> O(N^2) | |
SC -> O(1) | |
# Selection Sort | |
TC -> O(N^2) | |
SC -> O(1) | |
# Merge Sort | |
TC -> O(NlogN) //base 2 | |
SC -> O(n) | |
# Quick Sort | |
TC -> O(N^2) | |
SC -> O(logN) // base 2 | |
# Count Sort | |
TC -> O(n+k) | |
SC -> O(n+k) | |
-------------------- | |
ManojSatishKumar.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment