6. Elementary Sorting
Elementary comparison-based sorts: bubble, selection, insertion, Shell, comb, cycle, and curiosity sorts.
6. Elementary sorting, 30
| index | slug | name |
|---|---|---|
| 151 | bubble-sort | Bubble Sort |
| 152 | optimized-bubble-sort | Optimized Bubble Sort |
| 153 | cocktail-shaker-sort | Cocktail Shaker Sort |
| 154 | odd-even-sort | Odd Even Sort |
| 155 | gnome-sort | Gnome Sort |
| 156 | selection-sort | Selection Sort |
| 157 | stable-selection-sort | Stable Selection Sort |
| 158 | double-selection-sort | Double Selection Sort |
| 159 | insertion-sort | Insertion Sort |
| 160 | binary-insertion-sort | Binary Insertion Sort |
| 161 | shell-sort | Shell Sort |
| 162 | shell-sort-shell-gaps | Shell Sort with Shell Gaps |
| 163 | shell-sort-hibbard-gaps | Shell Sort with Hibbard Gaps |
| 164 | shell-sort-sedgewick-gaps | Shell Sort with Sedgewick Gaps |
| 165 | comb-sort | Comb Sort |
| 166 | cycle-sort | Cycle Sort |
| 167 | pancake-sort | Pancake Sort |
| 168 | stooge-sort | Stooge Sort |
| 169 | slow-sort | Slow Sort |
| 170 | bead-sort | Bead Sort |
| 171 | strand-sort | Strand Sort |
| 172 | library-sort | Library Sort |
| 173 | patience-sort | Patience Sort |
| 174 | tree-sort | Tree Sort |
| 175 | tournament-sort | Tournament Sort |
| 176 | smoothsort | Smoothsort |
| 177 | weak-heap-sort | Weak Heap Sort |
| 178 | cartesian-tree-sort | Cartesian Tree Sort |
| 179 | bingo-sort | Bingo Sort |
| 180 | exchange-sort | Exchange Sort |
Cycle Sort
Minimizes writes by placing each element directly into its correct position using cycles.
Cartesian Tree Sort
Sort by building a Cartesian tree and extracting elements via inorder traversal.