leetle

Daily challenge for 2026-06-12

528. Smallest Sufficient Power of Two

Given a positive integer target, find the smallest integer k such that 2^k is greater than or equal to target. You must find this value using a binary search approach on the possible range of exponents [0, 31].

Example:
Input: target = 10
Output: 4
(Because 2^3 = 8 and 2^4 = 16, 4 is the smallest exponent where 2^k >= 10).

Run this challenge interactively in Python or JavaScript when the app loads.