DP SOLUTION NEEDED!!

Revision en1, by javacoder1, 2016-12-16 02:17:54

You have a string of length 10^5 which is a binary representation of a number.The string has no leading zeros like 11001 represent the number 25. We have to represent it as sum of numbers of the form of 2^x or -2^x (x>=0) . Find the minimum number of numbers needed to do so. Please highlight the states you use and the transitions when replying !

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English javacoder1 2016-12-16 02:17:54 367 Initial revision (published)