← Microsoft questions
CodingEasy-Medium

Minimum Cost to Equalize Sticks

Filed under Microsoft

Given an array of stick lengths and an array of costs to change each stick's length by one unit, find the minimum total cost to make all sticks the same length.

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.