← Snapdeal questions

Minimum cost to make H array elements equal

Filed under Snapdeal

Given an array of integers, find the minimum total cost to make at least H elements equal, where the cost of incrementing an element by X is X.

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

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