Given a positive integer n, find the minimum number of operations to reduce it to 1. Allowed operations are: subtract 1, divide by 2 (if divisible), or divide by 3 (if divisible).
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.