One liner simple solution
Code\n\n/**\n * @param {number[]} nums\n * @param {number} k\n * @return {number[]}\n */\nvar maxSubsequence = function(nums, k) {\n    return nums\n        .ma
# Code\n```\n/**\n * @param {number[]} nums\n * @param {number} k\n * @return {number[]}\n */\nvar maxSubsequence = function(nums, k) {\n    return nums\n        .map((num, i) => ({ index: i, num }))\n        .sort(({ num: n1 }, { num: n2 }) => n2 - n1)\n        .slice(0, k)\n        .sort(({ index: i1 }, { index: i2 }) => i1 - i2)\n        .map(({ num }) => num);\n};\n```
['JavaScript']