implementation of the Quicksort and Insertion Sort algorithms