โ† Amazon questions

Minimum cost requirement for merging files

Filed under Amazon

Given an array of file sizes, merge them into one file. The cost of merging two files is the sum of their sizes. Find the minimum total cost to merge all files.

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 Amazon questions

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