Skip to content
Lus Loop, to the home page
Algorithms

Sorting and searching

Computers sort and search all the time. Bubble sort puts a list in order step by step, binary search finds something lightning fast in a sorted list.

Secondary (grade 2)12 to 16 yearsDraft: Not yet checked by a computing teacher.

Why

Someone is thinking of a number between 1 and 100. At most how many times do you have to guess if each time you hear: higher or lower?

If you try 1, 2, 3, …, it can take a hundred goes. If you guess cleverly, you never need more than seven.

The secret: start in the middle. Each time, half drops away. That only works if the numbers are in order. That is why computers sort so much.

Opening Kaft Plus…

Kaft Plus

The rest of “Sorting and searching” is in Kaft Plus

The learning path and the first 3 topics of Lus are free. Kaft Plus opens every topic and exercise.

Open with Kaft Plus

Already have Kaft Plus? The same button signs you in and brings you straight back.

Spotted a mistake?

A few words are enough. We will check and fix it.

Search

Loading…

Reading comfort

Choose what helps. Your choice is kept on this device.

Text size

Prefer your device’s own settings (zoom, screen reader, dark mode)? They work here too.