Python3 heapq O(nlogk)
python\ndef maxSubsequence(self, nums: List[int], k: int) -> List[int]:\n        res = []\n        for i,n in enumerate(nums):\n            if len(res) == k:\n 
```python\ndef maxSubsequence(self, nums: List[int], k: int) -> List[int]:\n        res = []\n        for i,n in enumerate(nums):\n            if len(res) == k:\n                heappushpop(res, (n, i))\n            else:\n                heappush(res, (n, i))\n        return [x[0] for x in sorted(res, key=lambda x: x[1])]\n```
['Heap (Priority Queue)', 'Python', 'Python3']