Python optimized solution with heap
\nclass Solution:\n    def maxSubsequence(self, nums: List[int], k: int) -> List[int]:\n        import heapq\n        \n        h = []\n        n = len(nums)\n 
```\nclass Solution:\n    def maxSubsequence(self, nums: List[int], k: int) -> List[int]:\n        import heapq\n        \n        h = []\n        n = len(nums)\n        for i in range(n):\n            heapq.heappush(h, (-nums[i], i))\n            \n        res = []\n        for _ in range(k):\n            v, idx = heapq.heappop(h)\n            res.append(idx)\n        res.sort()\n        return [nums[idx] for idx in res]\n```
['Heap (Priority Queue)', 'Python', 'Python3']