Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3370. Smallest Number With All Set Bits
Find the smallest integer x ≥ n whose binary representation is all 1s (i.e., x = 2^k − 1 for some k). In other words, determine the minimal k such that 2^k − 1 ≥ n.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.