File tree 1 file changed +10
-10
lines changed
1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -217,13 +217,13 @@ Below is the list of some of the most used Big O notations and their performance
217
217
218
218
### Array Sorting Algorithms Complexity
219
219
220
- | Name | Best | Average | Worst | Memory | Stable |
221
- | --------------------- | :-------: | :-------: | :-----------: | :-------: | :-------: |
222
- | ** Bubble sort** | n | n^2 | n^2 | 1 | Yes |
223
- | ** Insertion sort** | n | n^2 | n^2 | 1 | Yes |
224
- | ** Selection sort** | n^2 | n^2 | n^2 | 1 | No |
225
- | ** Heap sort** | n log(n) | n log(n) | n log(n) | 1 | No |
226
- | ** Merge sort** | n log(n) | n log(n) | n log(n) | n | Yes |
227
- | ** Quick sort** | n log(n) | n log(n) | n^2 | log(n) | No |
228
- | ** Shell sort** | n log(n) | depends on gap sequence | n (log(n))^2 | 1 | No |
229
- | ** Counting sort** | n + r | n + r | n + r | n + r | Yes |
220
+ | Name | Best | Average | Worst | Memory | Stable | Comments |
221
+ | --------------------- | :-------: | :-------: | :-----------: | :-------: | :-------: | :-------- |
222
+ | ** Bubble sort** | n | n^2 | n^2 | 1 | Yes | |
223
+ | ** Insertion sort** | n | n^2 | n^2 | 1 | Yes | |
224
+ | ** Selection sort** | n^2 | n^2 | n^2 | 1 | No | |
225
+ | ** Heap sort** | n log(n) | n log(n) | n log(n) | 1 | No | |
226
+ | ** Merge sort** | n log(n) | n log(n) | n log(n) | n | Yes | |
227
+ | ** Quick sort** | n log(n) | n log(n) | n^2 | log(n) | No | |
228
+ | ** Shell sort** | n log(n) | depends on gap sequence | n (log(n))^2 | 1 | No | |
229
+ | ** Counting sort** | n + r | n + r | n + r | n + r | Yes | r - biggest number in sorted array |
You can’t perform that action at this time.
0 commit comments