Given an array of denominations, you can spend $1 to transform x into any value in [ceil(x/2), x-1] or [x+1, 2x]. Find the minimum cost to make all elements equal to a target value.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.