Skip to main content
KBY Technologies Logo

Linear search and binary search

Race linear search against binary search, and see why binary search needs the list in order.

Binary search

  1. 12
  2. 24
  3. 311
  4. 416
  5. 518
  6. 631
  7. 732
  8. 843
  9. 951
  10. 1057
  11. 1159
  12. 1262
  13. 1373
  14. 1487
  15. 1591

Look for 59. The whole sorted list is in play.

Step 1 of 5
Linear search checks
11
Binary search checks
4
List number 3

Learn the idea