Time-complexity of algorithms
Suppose you have an algorithm that takes discrete objects
(such as DNA sequences) as inputs. We say that the
worst-case time complexity of this algorithm is O(f(n)) if
there is a constant M such that on each input of size n the
algorithm produces an output after running for at most
M ·f(n) steps. We say that the average-case time
complexity of this algorithm is O(f(n)) if there is a constant
M such that the expected number of steps on inputs of size