Fewest powers of two to add or subtract to reach zero

0
Remix

Given a positive integer n, one operation adds or subtracts any power of two. Return the fewest operations that bring n to 0.

UberOnline assessmentLast asked Feb 2026
No answer yet. Write the first one; the best answer gets endorsed.