Q1: you are given a string S of length N which encodes a non negative number V in a Binary Form. Two types of operation may be performed on it to modify its value.
if V is odd , subtract 1 from it
if V is even , divide it by 2
these operation performed until the V become 0;
Input: "011100"
Output : 7
Explanation: string binary "011100" represent integer as 28 and we need 7 steps to make it zero according to given rule.