In 5.10 question, I am not able to understand how we are calculating time complexity, I am understanding the procedure, but not able to contemplate how complexity is o(log(a-b+1)).Any help will be very helpful, thanks!
Finding complexity of generating uniform random numbers
Hi @ankit,
Because we need to calls log(a-b+1) of 0/1 random variable so that is the reason the time complexity is that.
1 Like