![]() |
VOOZH | about |
Given a non-negative integer n. The problem is to find the smallest perfect power of 2 which is greater than n without using the arithmetic operators.
Examples :
Input : n = 10 Output : 16 Input : n = 128 Output : 256
Algorithm :
Output:
Perfect power of 2 greater than 128: 256
Time Complexity: O(logn)
Auxiliary Space: O(1)