Optimal string joining algorithm
Filed under Microsoft IDC
The question
Given n strings with varying lengths and a joining function where the time complexity to join two strings is the sum of their lengths, design an optimal algorithm to join all n strings with minimal total time.
No write-up yet. Related questions below have one.
Related Microsoft IDC questions
Collected from public candidate posts and coding forums. Updated Nov 2026.