UNPKG

sort-types

Version:

Different types of sorts with their complexity and best/worst case scenarios.

35 lines (24 loc) 650 B
# Types of sorts Different types of sorts with their complexity and best/worst case scenarios. ## Has the following types of sorts * Bubble sort * Selection sort * Insertion sort * Merge sort * Quick sort ## Install ``` npm install 'sort-types'; ``` ## If you want to play around, you may use the functions like this ``` import { bubbleSort } from 'sort-types'; bubbleSort([3,1,8,4,2]); ``` ## Few upcoming sorts * Radix sort * Bucket sort * Heap sort ## FYI If you are wondering, how does <b>sort()</b> works,<br> it actually does <b>quick-sort</b> when converted to C++.