Instructions:

Find the Big Oh for the times of excecution of X: = x + 1. You should justify the answer:

I : = N

WHILE I >= 1 DO

BEGIN

FOR J : = 1 TO N DO

X : = X + 1

I = [I/2]

END

Thanks for any suggestions for solving it.

This topic has been dead for over six months. Start a new discussion instead.

Recommended Topics