help with a hiring question

Revision en1, by retry__, 2019-12-22 19:15:18

given a number x, we have to reach from 1 to x on number line and at each position i we can move to i+1 or to reverse of number i(ignoring the leading zeroes, say from 23 to 32). Find the minimum number of steps to reach x. x<=1e14

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English retry__ 2019-12-22 19:15:18 260 Initial revision (published)