When you run an algorithm, it generally behaves differently
depending on the data it has to process. An important consideration
of most algorithms is that the more data that is processed, the longer
the algorithm takes to run. For example, sorting a list of 10 numbers
takes less time than sorting a list of 1000 number (just as sorting a poker
hand of 5 cards takes less time then sorting the entire deck of 52 cards).
To acurately measure this quantity we need to define the notion of the
size of a problem
In many cases it is easy to see what the size of
the problem is (in our card example, the size of the problem is the number
of cards). The size of the problem can be related to the amount data
entered, the number of results returned, or the length of a particular
file that is being processed. Here are some examples: