insertion sort
1.0.0
After you clone this repo you need to move inside insertion-sort directory and run command
npm install
To run
npm installyou must have installed node.js
const testArray: number = [2, 5, -12, 91, 5];
insertionSort(testArray, SortDirection.DESC);[-12, 2, 5, 5, 91]insertionSort method takes two parametrs:
ASC or DESC (ASC is default option)ASC (Ascending), DESC Descending)
On this graphic you can see how insertion-sort algortihm works :