...

/

Selection Sort Pseudocode

Selection Sort Pseudocode

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:

  1. Find the smallest card. Swap it with the first card.

  2. Find the second-smallest card. Swap it with the second card.

  3. 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