Complexity cases

[comp1110-2D]

Often the running time of an algorithm depends on the arrangement of the input (such as in insertion sort). For this reason we talk about best-case, average-case worst-case complexity. Worst-case complexity is usually the most useful, because it gives a guarantee that the algorithm will never take longer than that bound.

bars magnifying-glass caret-down plus minus arrow-right xmark