You are given an array of positive integers price, where each element represents the price of a candy, and an integer k.
A candy basket contains k distinct candies chosen from price. The tastiness of a candy basket is defined as the minimum absolute difference between the prices of any pair of candies in the basket.
Return the maximum tastiness that can be achieved for a basket containing k candies.
Constraints:
k price.length
price[i]
You are given an array of positive integers price, where each element represents the price of a candy, and an integer k.
A candy basket contains k distinct candies chosen from price. The tastiness of a candy basket is defined as the minimum absolute difference between the prices of any pair of candies in the basket.
Return the maximum tastiness that can be achieved for a basket containing k candies.
Constraints:
k price.length
price[i]