But, the question is to find the LEAST number of flips required to set the (2**n)-1 th bit....If dp[2] is done as you have given above, it wont give the least number of flips, as required by the question.....
Vikram
But, the question is to find the LEAST number of flips required to set the (2**n)-1 th bit....If dp[2] is done as you have given above, it wont give the least number of flips, as required by the question.....
Vikram