Array
2966. Divide Array Into Arrays With Max Difference
Given an array nums of 3n numbers and a value k. Partition it into n triples so that in each triple, max − min ≤ k. Return any valid partition, or an empty array if impossible. After sorting,…
Loading…