Uses a divide and conquer methodology like merge sort.
It works by selecting a 'pivot' element from the array and partitioning the other elements into two sub-arrays, according to whether they are less than or greater than the pivot. The sub-arrays are then sorted recursively.
Here, we will chose the last element as the pivot.
Runtime: O(n log(n)) on average and O(n^2) in the worst case (low probability)
Memory: O(log (n))