✔ Easy Solution || Map || Priority Queue
\nclass Solution{\npublic:\n    typedef pair<int, int> pd;\n    vector<int> maxSubsequence(vector<int> &nums, int k)\n    {\n        pair<int, int> p;\n        
```\nclass Solution{\npublic:\n    typedef pair<int, int> pd;\n    vector<int> maxSubsequence(vector<int> &nums, int k)\n    {\n        pair<int, int> p;\n        priority_queue<pd, vector<pd>, greater<pd>> q;\n\n        for (int i = 0; i < nums.size(); i++)\n        {\n            p = make_pair(nums[i], i);\n            q.push(p);\n            if (q.size() > k)\n                q.pop();\n        }\n        map<int, int> m;\n        while (!q.empty())\n        {\n            m.insert({q.top().second, q.top().first});\n            q.pop();\n        }\n        vector<int> ans;\n        for (auto itr : m)\n            ans.push_back(itr.second);\n        return ans;\n    }\n};\n```
['C', 'Heap (Priority Queue)']