@@ -9,7 +9,7 @@ Sorting is one of the most common solutions when we want to extract some insight
99We can sort to get the maximum or minimum value and many algorithmic problems involves sorting data first.
1010
1111.We are going to explore three basic sorting algorithms _O(n^2^)_ which have low overhead:
12- - <<part04-algorithmic-toolbox#insertion -sort>>
12+ - <<part04-algorithmic-toolbox#bubble -sort>>
1313- <<part04-algorithmic-toolbox#selection-sort>>
1414- <<part04-algorithmic-toolbox#insertion-sort>>
1515
@@ -120,7 +120,7 @@ We explored many algorithms some of them simple and other more performant. Also,
120120[cols="20,80"]
121121|===
122122| Algorithms | Comments
123- | <<part04-algorithmic-toolbox#insertion -sort>> | Swap pairs bubbling up largest numbers to the right
123+ | <<part04-algorithmic-toolbox#bubble -sort>> | Swap pairs bubbling up largest numbers to the right
124124| <<part04-algorithmic-toolbox#insertion-sort>> | Look for biggest number to the left and swap it with current
125125| <<part04-algorithmic-toolbox#selection-sort>> | Iterate array looking for smallest value to the right
126126| <<part04-algorithmic-toolbox#merge-sort>> | Split numbers in pairs, sort pairs and join them in ascending order
@@ -131,12 +131,11 @@ We explored many algorithms some of them simple and other more performant. Also,
131131.Sorting algorithms time/space complexity and properties
132132|===
133133| Algorithms | Avg | Best | Worst | Space | Stable | In-place | Online | Adaptive
134- | <<part04-algorithmic-toolbox#insertion -sort>> | O(n^2^) | O(n) | O(n^2^) | O(1) | Yes | Yes | Yes | Yes
134+ | <<part04-algorithmic-toolbox#bubble -sort>> | O(n^2^) | O(n) | O(n^2^) | O(1) | Yes | Yes | Yes | Yes
135135| <<part04-algorithmic-toolbox#insertion-sort>> | O(n^2^) | O(n) | O(n^2^) | O(1) | Yes | Yes | Yes | Yes
136136| <<part04-algorithmic-toolbox#selection-sort>> | O(n^2^) | O(n^2^) | O(n^2^) | O(1) | No | Yes | No | No
137137| <<part04-algorithmic-toolbox#merge-sort>> | O(n log n) | O(n log n) | O(n log n) | O(n) | Yes | No | No | No
138- | <<part04-algorithmic-toolbox#quicksort>> | O(n log n) | O(n^2^ ) | O(n log n ) | O(log n) | Yes | Yes | No | No
138+ | <<part04-algorithmic-toolbox#quicksort>> | O(n log n) | O(n log n ) | O(n^2^ ) | O(log n) | No | Yes | No | No
139139// | Tim sort | O(n log n) | O(log n) | Yes | No | No | Yes
140140|===
141141// end::table[]
142-
0 commit comments