3370. Smallest Number With All Set Bits
You are given a positive number
n.Return the smallest number
xgreater than or equal ton, such that the binary representation ofxcontains only set bits.A set bit refers to a bit in the binary representation of a number that has a value of
1.
1 | class Solution { |