Minimum Difference Between Highest and Lowest of K Scores
Intuition\n Describe your first thoughts on how to solve this problem. \nusing list append method and two pointer algorithm\n\n# Approach\n Describe your approa
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nusing list append method and two pointer algorithm\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\ntwo pointer algorithm\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nn\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(n)\n\n# Code\n```\nclass Solution:\n    def minimumDifference(self, nums: List[int], k: int) -> int:\n     a=[]\n     i=0\n     j=k-1\n     nums=sorted(nums)\n     if(len(nums)!=1):\n         while(j<=len(nums)-1):\n             a.append(nums[j]-nums[i])\n             i=i+1\n             j=j+1\n     else:\n        return(0)\n     return min(a)\n```
['Two Pointers', 'Python3']