

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 8
click for more info
Not enough gems
Cost: 6 gems
1: Sorting Algorithms
incomplete
2: Bubble Sort
incomplete
3: Bubble Sort Big O
incomplete
4: Why Bubble Sort?
incomplete
5: Merge Sort
incomplete
6: Merge Sort Big O
incomplete
7: Why Merge Sort?
incomplete
8: Insertion Sort
incomplete
9: Insertion Sort Big O
incomplete
10: Why Use Insertion Sort?
incomplete
11: Quick Sort
incomplete
12: Quick Sort Big O
incomplete
13: Fixing Quick Sort
incomplete
14: Why Use Quick Sort?
incomplete
15: Selection Sort
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Quick sort is an efficient sorting algorithm that's widely used in production sorting implementations. Like merge sort, quick sort is a recursive divide and conquer algorithm.
Divide:
Conquer:
Click to play video
We now have two sorting algorithms on our LockedIn backend! It is a bit annoying to maintain both in the codebase. Quicksort is fast on large datasets just like merge sort, but is also lighter on memory usage. Let's use quick sort for both follower count and influencer revenue sorting!
Complete the quick_sort and partition functions according to the given algorithms.
The process is started with quick_sort(A, 0, len(A)-1).