Leetcode 1502. Can Make Arithmetic Progression From Sequence
文章作者:Tyan博客:noahsnail.com|CSDN|1.DescriptionCanMakeArithmeticProgressionFromSequence2.Solution解析:Version1,先排序,再判断其是否是算术(等差)数组。Version2以空间换时间,找出最大最小值,最大最小值相等,则数全相同为等差数列,如果最大最小值之差不能整除数组长度减1,说明是非等差数列。构造等