But as long as the curve seems to be converging to a straight line, then the running time bound should be valid. Properties of logs The log function shows up so often in running time bounds that it's worth reviewing some of its properties. The last of these rules is particularly important for big-O bounds. It says that the log to the base b and the log to the base a are related by a constant factor, log b a . The base doesn't make any difference, so it is usually left out of big-O bounds.
Lets start with an easy case.
There are 3 nested for loops, each of which runs N times. N 3 times. In the previous chapter we looked at bubble sort and binary search. We will give a simple analysis of both algorithms here. First, let's look at bubble sort.