🔥🔥🔥 2 Lines Beats 99% and Simple to understand 🔥🔥🔥🔥🚀
Bold# 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-
**Bold**# 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 maxSubsequence(self, nums: List[int], k: int) -> List[int]:\n        ordered = sorted((v,i) for i,v in enumerate(nums))[-k:]\n        return [v for v,_ in sorted(ordered, key=lambda x: x[1])]\n\n```
['Python3']