+ 1

least steps

c++ code for the least possible steps for reaching a number just by multiplying by 2 and adding 1. example: for 25 0+1->1*2->2+1->3*2->6*2->12*2->24+1=25. the least steps are 7.

29th Jul 2017, 4:58 PM
Raamkumar T
Raamkumar T - avatar
1 ответ
30th Jul 2017, 3:28 AM
OrbitHv [Inactive]
OrbitHv [Inactive] - avatar