##
Minimum difference between max and min of all K-size subsets
March 24, 2017

Given an array of integer values, we need to find the minimum difference between maximum and minimum of all possible K-length subsets. Examples: Input : arr[] = [3, 5, 100, 101, 102] K = 3 Output : 2 Possible subsets of K-length with their differences are, [3 5 100] max min diff is (100 -… Read More »