Hi there,

I am having trouble understand how they derive these running times for the code in the image below.


I am having trouble especally with log n running times, how are they derived? especially the bottom left slide.

If someone can shed some light on this, I would gladly appreciate it!!!

Thanks in advance.

The log is caused by the j <= n/i
As i gets larger n/i will get smaller
Try replacing n with and actual number and see the results