sec bestworstand average cases log log log log figure costs for growth rates representative of most computer algorithms we can get some further insight into relative growth rates for various algorithms from figure most of the growth rates that appear in typical algorithms are shownalong with some representative input sizes once againwe see that the growth rate has tremendous effect on the resources consumed by an algorithm bestworstand average cases consider the problem of finding the factorial of for this problemthere is only one input of given "size(that isthere is only single instance of size for each value of nnow consider our largest-value sequential search algorithm of example which always examines every array value this algorithm works on many inputs of given size that isthere are many possible arrays of any given size howeverno matter what array the algorithm looks atits cost will always be the same in that it always looks at every element in the array one time for some algorithmsdifferent inputs of given size require different amounts of time for exampleconsider the problem of searching an array containing integers to find the one with particular value (assume that appears exactly once in the arraythe sequential search algorithm begins at the first position in the array and looks at each value in turn until is found once is foundthe algorithm stops this is different from the largest-value sequential search algorithm of example which always examines every array value there is wide range of possible running times for the sequential search algorithm the first integer in the array could have value kand so only one integer is examined in this case the running time is short this is the best case for this algorithmbecause it is not possible for sequential search to look at less than one value alternativelyif the last position in the array contains kthen the running time is relatively longbecause the algorithm must examine values this is the worst case for this algorithmbecause sequential search never looks at more than