Minimum Steps to reduce number to 1
Problem Given a positive integer N, find the smallest number of steps it will take to reach 1. There are two kinds of permitted steps: You may decrement N to N - 1. If a * b = N, you may decrement N to the larger of a and b. Examples Example 1: Input: N = 100 Output: 5 Explanation: 100 -> 1 with the following route: `100 -> 10 -> 9 -> 3 -> 2 -> 1`. ...