← Samsung questions

Check if a number is a power of 2 in O(1)

Filed under Samsung · Also reported at Tally Solutions

Determine if a given integer n is a power of two using bitwise operations in O(1) time.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Samsung questions

Collected from public candidate posts and coding forums. Updated Nov 2026.