← Questions
Fewest powers of two to add or subtract to reach zero
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Given a positive integer n, one operation adds or subtracts any power of two. Return the fewest operations that bring n to 0.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding
