Algorithm course solution to QuickSort and count up comparison during execution