Problem 2541 · Medium

Minimum Operations to Make Array Equal II

Every difference must be a multiple of k, and the positive steps must cancel the negative ones exactly.

Open the interactive visualisation