All Problems

Range Bitwise AND

MediumbitsExpected: O(log n) time, O(1) spaceInterview Context
prefix-sumbit-manipulation

Problem

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

Loading...