Problem 667 · Medium
Zig-zag between the two ends of a range to produce k distinct differences, then finish in order.
Open the interactive visualisation