Online Algorithm

Domain: Algorithms

🎯 Motivation

An algorithm that processes input piece by piece as it arrives, without knowing the future. Must make decisions with partial information.

📋 Concrete Example

LRU cache is online: it must decide what to evict as requests arrive, without knowing future requests. Insertion sort is online: it sorts as elements arrive one by one.

🔗 Analogy

A goalkeeper in football: they must react to each shot as it comes, without knowing where the next shot will go. They cannot see the future; they must decide with current information.