Skip to content
AgileLogics
Intermediate 5 min read

Algorithms in Practice

Prerequisites: Loops, Conditions

Beyond the basic definition, real algorithm work is about comparing different correct solutions to the same problem, since some are much faster than others as the input grows.

For example, searching for a name in a phone book:

  • Linear search — check every entry from the start until you find it. Simple, but slow for a big list.
  • Binary search — since a phone book is sorted, jump to the middle, decide if your target is before or after it, and repeat on the correct half. Dramatically faster on a large, sorted list.

Both are correct algorithms for the same problem — the difference is efficiency. This kind of comparison ("how does this scale as the input grows?") is what "algorithms" mostly means in professional practice.