WHILE_CMPL : Unsolved
About the WHILE_CMPL : Unsolved category
The problems does not assume what data type of N is, so this is the mathematically solution
My explanation in case you don't understand the solution
It will not create an infinite loop
Loop is not terminating
It never the case of infinite loop
This creates an infinite loop
I don't get the logic of "We have to find first x such that N / 2^x < 1 OR 2^x > N"
It should be while(i>1)
Why it should be i>1 for O(logN)?
Should be O(log(2n))
The Ques is wrong
Not moving to another question
Shouldn't it be while(i>1)?
Options should be log2() instead of log()
next page →