[[online algorithm|Online]] selection may refer narrowly to computing the ''k''th smallest element of a stream, in which case partial sorting algorithms (with ''k'' + O(1) space for the ''k'' smallest elements so far) can be used, but partition-based algorithms cannot be.
In certain selection problems, selection must be online, that is, an element can only be selected from a sequential input at the instance of observation and each selection, respectively refusal, is irrevocable. The problem is to select, under these constraints, a
specific element of the input sequence (as for example the largest or the smallest value)
withAlternatively, largestselection probability.itself This problem canmay be tackledrequired byto thebe [[Oddsonline algorithm|online]], designedthat byis, [[F.an Thomaselement Bruss]]can whoonly coinedbe selected from a sequential input at the nameinstance Oddsof algorithmobservation and each selection, respectively refusal, is irrevocable. ItThe problem is alsoto knownselect, under these constraints, a specific element of the input sequence (as Bruss-algorithmfor example the largest or Bruss-strategythe smallest value) with largest probability. This problem can be tackled by the [[Odds algorithm]], which yields the optimal under an independence condition; it is also optimal itself as an algorithm with the number of computations being linear in the length of input.
The simplest example is the [[secretary problem]] of choosing the maximum with high probability, in which case optimal strategy (on random data) is to track the running maximum of the first ''n''/''e'' elements and reject them, and then select the first element that is higher than this maximum.