Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 231. Power of Two
Determine whether a given 32-bit integer n is a power of two (i.e., n == 2^x for some integer x), returning false for non-positive values. A common O(1) approach uses a bit-manipulation pattern to check this without loops.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early August, 2024
Meta
Senior
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.