# Sort A `Sort` algorithm takes an array of values and rearranges them in order. ## API ```typescript function GenericSort (array, comparator?, step?) {} ``` ## Implementations - [BubbleSort][] - [InsertionSort][] - [QuickSort][] - [SelectionSort][] [BubbleSort]: ./Sort/BubbleSort.md [InsertionSort]: ./Sort/InsertionSort.md [QuickSort]: ./Sort/QuickSort.md [SelectionSort]: ./Sort/SelectionSort.md ## Resources - [2.1 Elementary Sorts - Algorithms (4th ed)][] - [Selection.java - Algorithms (4th ed)][] - [Selection Sort - trekhleb/javascript-algorithms][] [2.1 Elementary Sorts - Algorithms (4th ed)]: https://algs4.cs.princeton.edu/21elementary/ [Selection.java - Algorithms (4th ed)]: https://algs4.cs.princeton.edu/21elementary/Selection.java.html [Selection Sort - trekhleb/javascript-algorithms]: https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/sorting/selection-sort