c++ - Big-O notation Help -
while (n >= 1) n /= 2; i unable big-o notation this
i'll follow pointy's advice sake of exposition.
try 8.
4 2 1 0: 4 iterations. try 32.
16 8 4 2 1 0: 6 iterations. try 66.
33 16 8 4 2 1 0: 7 iterations. so… how initial numbers changing, , how numbers of iterations changing?
Comments
Post a Comment