Sorting algorithms are powerful about understanding for time complexity of algorithms because include nested loops.
The table at the below represents time complexities at three states.
- Best Case
- Avarage Case
- Worst Case We suppose sorting algorithms are on worst case.(for optimization)
Sorting Algorithm and Time Complexities
Best Case | Average Case | Worst Case | |
---|---|---|---|
Selection Sort | Ω(N2) | Θ(N2) | O(N2) |
Insertion Sort | Ω(N) | Θ(N2) | O(N2) |
- dotnet core console application(ver 3.1.402)
- Clone project to computer
- compile with 'dotnet run'
- choose data size between 10 and 10000
- choose your sorting algorithm
- thats it!
You can fork project and write new sorting algorithms.
you can open a pull request too.