Author: Mario Flores Jr.
Version: 1.0.0
This lab is an exercise in researching three particular sorting algorithms, and implementing them into working functions that each take an integer array as a single argument and sorting it appropriately.
- Goes through the given array by comparing two adjacent values, checking if they are in correct order. If the adjacent values are not in correct order, they are swapped, and the sort moves down to the next adjacent values. The pattern continues until array is completely sorted.
Big O: Time - O(n2) Space - O(1)
- Goes through the given array and compares the values of a current index with previous index values and will insert the value into the correct order. The pattern continues until the array is completely sorted.
Big O: Time - O(n2) Space - O(1)
- Goes through the given array and finds the smallest value, swapping it into the correct position. The pattern continues until the array is completely sorted.
Big O: Time - O(n2) Space - O(1)
JavaScript, babel, eslint