basantCoder's blog

By basantCoder, history, 2 months ago, In English

You start with 0 and you have to Find the minimum number of operations to reach 'n'. In one operation you can add or subtract any 2^k to your current number. Where k can be any positive integer.
Constraints:
test cases <200,000;
1 <= | n | <= 1,000,000,000 .

Read more »

 
 
 
 
  • Vote: I like it
  • -25
  • Vote: I do not like it