✅ One Line Solution
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)\n\nTime complexity: O(n^2). Space complexity: O(n).
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)\n\nTime complexity: $$O(n^2)$$. Space complexity: $$O(n)$$.\n```python3\nclass Solution:\n    def findXSum(self, a: List[int], k: int, x: int) -> List[int]:\n        return [sum(map(prod,nlargest(x,Counter(a[i:i+k]).items(),lambda q:q[::-1]))) for i in range(len(a)-k+1)]\n```
['Array', 'Hash Table', 'Sliding Window', 'Heap (Priority Queue)', 'Python', 'Python3']