Exercises/#88 Bitwise AND of Numbers Range
#88

Bitwise AND of Numbers Range

Medium⚡ Bit Manipulation
70 XP

Problem

Given two integers left and right, return the bitwise AND of all numbers in the range [left, right].

Examples

Input: left=5, right=7
Output: 4

Input: left=0, right=0
Output: 0

Input: left=1, right=2147483647
Output: 0
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

88 / 150

Your Solution

⚡ JavaScript

to save progress and use AI features