Can Make Arithmetic Progression From Sequence

Easy · Arrays & Strings · about 5 minutes

Asked at Google, Amazon, Bloomberg, Meta, Microsoft.

Return true if the array arr can be rearranged into an arithmetic progression (every two consecutive elements have the same difference).