← Microsoft questions

Equalize stick lengths with minimum cost

Filed under Microsoft

Given an array of stick lengths and an array of costs per unit to change each stick's length, find the minimum total cost to make all sticks equal to some target length L.

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

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