Comments
Loading Dream Comments...
You must be logged in to write a comment - Log In
Imagine you have a box with a bunch of cards that have numbers written on them. Let's say you want to put these cards in order from smallest to largest.
Quicksort is a way to sort these cards quickly. Here's how it works:
First, you pick one card from the box. This card is called the "pivot." You can think of the pivot as a special card that helps us sort the other cards.
Next, you look at all the other cards and separate them into two groups. One group will have cards with numbers smaller than the pivot, and the other group will have cards with numbers larger than the pivot.