Skip to content

Latest commit

 

History

History

ms-mindifference

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Min Difference 最小差

Input: A int array
Output: Minimum absolute value of pairwise difference in the array.

输入:整型数组
输出:数组中的数两两之差绝对值的最小值

In my opinion, it is depending on the sorting algorithm. When a sorting completed, just get the min diff near by.
我感觉取决于排序算法的复杂度。排序完成之后只需要计算相邻两个元素的最小值即可。

mindiff.py CuGBabyBeaR