Computers can only ever compare two things at a time. This makes sorting a challenge. There are many different ways a computer can try and sort things. This video shows nine different ways of sorting. Some ways are much faster than others.
In coding, loops are just blocks of code that get repeated a certain number of times or until a condition is met. You might find loops in the real world, like a Ferris wheel. A rider gets on and is stuck in the wheel until it loops around a certain number of times. Then, the rider gets off and continues their day.
Select an activity below to download the PDF.
Your school schedule runs in a loop. What do you do first at school each day? What is next?
Have you read other books about loops or sorting? What did you learn?
Stores usually sort their products into groups. Toys are all in one section. Shoes are in another section. What else is sorted in a group at a store?