Smallest Number With All Set Bits
Given a positive integer n, find the smallest number >= n whose binary representation consists entirely of set bits (i.e., of the form 2^k - 1). Return that number.
Given a positive integer n, find the smallest number >= n whose binary representation consists entirely of set bits (i.e., of the form 2^k - 1). Return that number.