โ† Visa questions

Minimum Cost to Reduce Piles to Smallest Height

Filed under Visa

Given n piles of boxes with various heights, compute the minimum cost to reduce all piles down to the height of the smallest pile, where reducing a pile's height from h to h-1 costs 1 per box removed.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Visa questions

Collected from public candidate posts and coding forums. Updated Nov 2026.