← Advanced Coding

Binary searchPremium

This lesson is part of Premium

To find a name in a phone book you don't read every page. You open the middle, decide which half it's in, and repeat. Each guess halves the search, so a million items take only about 20 steps! This is binary search, and it only works on sorted lists.

Free lessons are marked on the lesson map. Premium unlocks the rest of the path, including the boss levels and all of the Game Projects.