please explain the time complexity of inside part of while loop.
How the time complexity for if else is constant in binary search?
By that bhaiya means that it’s doing constant work in one iteration
For one iteration, the while loop is doing constant work as its NOT dependent on N
as it’s always comparing mid and key
hence for 1 iteration we can say that the loop does constant work say C
total work = (constant work C)*steps
= nlogn