Searching Algorithms | Lilac & Logic

Lesson 02

Linear vs. Binary Search

Understanding how we find items in a sorted list and why algorithm design drastically impacts execution speed.

The Searching Problem

Imagine looking up a word in a physical dictionary or searching for a contact in your phone. How you search determines whether it takes 2 seconds or 20 minutes. In computer science, Linear Search and Binary Search represent the two fundamental strategies.

Why Scale Matters: Speed Comparison

Here is how the maximum number of steps compares as your dataset grows:

← Previous Lesson: Sorting Next Lesson: Big-O Guide →