Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1984. Minimum Difference Between Highest and Lowest of K Scores
Given an array of student scores and an integer k, choose k scores so the difference between the highest and lowest selected score is minimized. This is typically solved by sorting the array and scanning all length-k contiguous windows to find the smallest max−min range.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.