Given a positive integer n and 3 operations on n:
Find the minimum number of above operations to reduce n to 1.
Example 1:
Input: n = 9
Output: 2
Explanation:
Step 1: 9 / 3 = 3
Step 2: 3 / 3 = 1Example 2:
Input: n = 8
Output: 3
Explanation:
Step 1: 8 / 2 = 4
Step 2: 4 / 2 = 2
Step 3: 2 - 1 = 1Example 3:
Input: n = 28
Output: 4