← Amazon questions

Merge strings with minimum cost and implement heap operations

Filed under Amazon

Given a set of strings, merge all strings into a single string such that the total cost is minimized, where merging two strings costs the sum of their lengths. Implement the underlying min-heap…

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.