most concise, simple solution | Python O(nlogn)
SolutionIntuitive DP Combinatorics solution, no explanation necessary
Time complexity: O(nlogn)

Space complexity: O(1)
Code
# Solution
<!-- Describe your first thoughts on how to solve this problem. -->
Intuitive DP Combinatorics solution, no explanation necessary

- Time complexity: O(nlogn)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def minMaxSums(self, nums: List[int], k: int) -> int:
        return(q:=((t:=0)+1+(nums:=sorted(nums))[-1]-nums[-1]))and[t:=t+((q:=2*q-comb(i,k-1))+comb(i,k-1))//2*(nums[i]+nums[-i-1]) for i in range(len(nums))][-1]%(10**9+7)
```
['Python3']