Exercises/#86 Power of Two
#86

Power of Two

Easy⚡ Bit Manipulation
40 XP

Problem

Given an integer n, return true if it is a power of two.

Examples

Input: n=1
Output: true (2^0)

Input: n=16
Output: true (2^4)

Input: n=3
Output: false
bit-manipulation
AI Assistant— powered by AI

Unlock hints progressively — start gentle, go deeper only if needed.

💡

Level 1: Gentle Nudge

A subtle direction

🗺️

Level 2: Approach

The algorithm to use

🔍

Level 3: Detailed

Step-by-step guidance

86 / 150

Your Solution

⚡ JavaScript

to save progress and use AI features