You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DataAndAlgoL/Chpt10SortingAlgorithms/Chpt10Notes.org
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@
19
19
Bubble sort continues its iterations until no more swaps are needed.
20
20
Has high complexity time and is too Simplest
21
21
** Only significant advantage of bubble sort is detecting whether input list is sorted or not
22
+
complexity = O(n^2)
22
23
23
24
** SELECTION SORT
24
25
*** Works well for small files. Used to sort very large values with very small keys. Because selecyion is made based on keys and swaps are made only when required
@@ -32,7 +33,7 @@
32
33
2. swap it with the value in the current position
33
34
3. repeat process for all elements until the entire array is sorted
34
35
35
-
** INSERTION SORT
36
+
** INSERTION SORT !! -> WATCH VIDEO ABOUT INSERTION SORT
36
37
simple and efficient comparison sort.
37
38
** Each iteration removes an element from the input data and inserts it into the correct position in the list being sorted.
38
39
** The choice of the element being removed from the input is random and this process is repeated until all elements are sorted.
@@ -48,4 +49,4 @@
48
49
- Every repetition of insertion removes an element from the input data, and inserts it into the correct position in the already sorted list until no input elements remain.
49
50
- Sorting is typically done in-place. The resulting array after k iterations has the property where the first k+1 entries are sorted
0 commit comments