list| sorting
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def kSum(self, nums: List[int], k: int) -> int:\n        lis=[]\n        sumi=0\n        t=[]\n        for i in nums:\n            if i>=0:\n                sumi+=i\n                t.append(-i)\n            else:\n                t.append(i)\n        t.sort(reverse=True)\n        t=t[:k+2]\n        lis.append(sumi)\n        for i in t:\n            n=len(lis)\n            for j in range(n):\n                lis.append(i+lis[j])\n            lis.sort(reverse=True)   \n            if len(lis)>k:\n                lis=lis[:k]\n        return lis[k-1]    \n```
['Python3']