Given an integer N, find the minimum number of operations to reduce N to 1. Allowed operations: 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.