Changed the quicksort method to free the input list after iterating through it, and assert that the list is sorted at the end.