Bit Manipulation - Bitwise AND of Numbers Range
What is the worst-case time complexity of the optimal algorithm that computes bitwise AND of numbers in range [left, right] by repeatedly right-shifting both until they are equal?
log2(right) bits, the time complexity is O(log(right)).15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions