목록Minimum Difference Between Highest and Lowest of K Scores (1)
kohigowild

Minimum Difference Between Highest and Lowest of K Scores You are given a 0-indexed integer array nums, where nums[i] represents the score of the ith student. You are also given an integer k. Pick the scores of any k students from the array so that the difference between the highest and the lowest of the k scores is minimized. Return the minimum possible difference. Example 1: Input: nums = [90]..
Algorithm
2022. 11. 18. 23:07