Time Complexity


Definition: Time Complexity

The Time complexity of an algorithm measures the time (read number of elementary steps) required to compute an algorithm as a function of the size of the input. Time complexity of an algorithm is usually expressed using Big O Notation (see the next section).

The Future? (a recent article).

The Tower of Hanoi

The .jar

Hanoi

The idea is to move a stack of disks from one peg to another, one at a time but always putting a smaller disk on top of a bigger one The measure of Time complexity is the number of individual disk moves required as a function of the size of the stack.