Problem 1675 · Hard

Minimize Deviation in Array

Make every value even, then repeatedly halve the largest value in a max heap while tracking the smallest.

Open the interactive visualisation