Check out a free preview of the full Four Semesters of Computer Science in 5 Hours course:
The "Exercise 5: Quick Sort" Lesson is part of the full, Four Semesters of Computer Science in 5 Hours course featured in this preview video. Here's what you'd learn in this lesson:

- In this exercise, you will create a quickSort() function that will grab a pivot from the end of the list and create two lists of values that are greater than and lesser than the pivot. The function will then recursively execute on these subsequent lists until all values are sorted and concatenated back into a single list.

Get Unlimited Access Now

Transcript from the "Exercise 5: Quick Sort" Lesson

[00:00:00]
>> [MUSIC]

[00:00:04]
>> Brian Holt: So I'd recommend while you're doing the exercise just keep this up. All the logic that you need exists right here. And just so you know, we saw how much code it took to do merge sort, that's about half as much code to do Quicksort, just FYI. And it's probably gonna be done in one function.

[00:00:21] I did it all in one function so I imagine you're going to do it all one function too. Okay, so go ahead and open your exercise.
>> Brian Holt: Like that.
>> Brian Holt: Again, no visualization helper here, unfortunately.
>> Brian Holt: And this is just gonna kind of recap to you what Quickssort is.

[00:00:45] Please use xdescribe or else you're gonna have a bad day. Or at least crash tabs. And we'll give you another 20 minutes to do this.