Given N. You can perform 3 types of operations:
You have to find the minimum number of operations needed to reach 1.
This is a companion discussion topic for the original entry at https://toph.co/p/a-journey-towards-one
Given N. You can perform 3 types of operations:
You have to find the minimum number of operations needed to reach 1.
In the test case the minimum number of making 23 into 1 is 7 in my sense.
why 6? can anyone explain it?
How about this?
23 -> 24 -> 12 -> 6 -> 3 -> 2 -> 1