Does not got how you find max range?

Ceil(log2(n))
if n=9

then ceil is 3.16 how you say 15 ??

ceil(3.16) would be 4 as decimal is rounded off to the next integer

Ok 4 but how max range of n comming is 15 ?

can u share snippet of what u are exactly referring to??

https://online.codingblocks.com/app/player/206137/content/192993/6881/lecture

At 3:00 how he has calculate range of 9 by using ceil(logN)
how max range is 15 ?

so after doing ceil what we are doing is taking 2^4 - 1 = 15

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.