Insertion Sort Demonstration
What Is Insertion Sort?
Insertion sort works like sorting playing cards in your hands:
- Start with the second number.
- Compare it with the one before.
- If it’s smaller, move the bigger one to the right.
- Keep doing this until the smaller number finds its correct place.
- Repeat this for every number in the list.