best case

The input of a given size that makes an algorithm do the least work, and the cost on that input.

In more detail

Linear search's best case is finding the target in the first slot, costing one comparison. Best cases are rarely useful for planning, because you cannot count on getting them. They do explain why insertion sort is fast on nearly sorted input.

Related terms

Taught in

References