Program  complexity 

      = a  NlogN +  bN + C

      = a  NlogN +  O(N)

       ( a  NlogN  =>  leading term)

1 const each statement constant times
logN log wpeE.gif (1295 bytes)

(each  step  half   input)

N liner wpeF.gif (1531 bytes)

(divide and conquer)

NlogN    wpe10.gif (1301 bytes)
wpe12.gif (895 bytes) quadratic wpe11.gif (1582 bytes)

(recurrent relation)

wpe13.gif (891 bytes) cublic   
wpe14.gif (884 bytes) exponential   

Common Mistakes

           wpe15.gif (1078 bytes)