You are given a list of integers nums. Split its elements into three groups, numbered group 1, group 2, and group 3. Every element goes into exactly one group, and no group may be empty.
After a split, pick one element from each group: x from group 1, y from group 2, and z from group 3. The cost of that pick is abs(x - y) + abs(y - z). The spread of the split is the smallest cost over every possible pick.
Return the largest spread you can get over every possible split of nums.
Note that the group numbers matter. y always comes from group 2, so swapping the contents of two groups gives a different split, which can have a different spread.
Note that equal values may go into different groups.
Note that the answer can exceed the 32-bit integer range.
nums.length ≤105nums[i] ≤109