Selection Sort Pseudocode
We'll cover the following...
There are many different ways to sort the cards. Here's a simple one, called selection sort, possibly similar to how you sorted the cards above:
Find the smallest card. Swap it with the first card.
Find the second-smallest card. Swap it with the second card.
Find the third-smallest card. Swap it with the third ...
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy