JAVA || EASY SOLUTION || SORTING || O(NLOGN)
\nclass Node{\n    int index,value;\n    Node(int index,int value){\n        this.index=index;\n        this.value=value;\n    }\n}\n\nclass Solution {\n    pub
```\nclass Node{\n    int index,value;\n    Node(int index,int value){\n        this.index=index;\n        this.value=value;\n    }\n}\n\nclass Solution {\n    public int[] maxSubsequence(int[] nums, int k) {\n        Node nodes[]=new Node[nums.length];\n        for(int i=0;i<nums.length;i++)\n            nodes[i]=new Node(i,nums[i]);\n        Arrays.sort(nodes,(a,b)->a.value-b.value);\n        Arrays.sort(nodes,nums.length-k,nums.length,(a,b)->a.index-b.index);\n        int res[]=new int[k];\n        for(int i=0;i<k;i++)\n            res[k-1-i]=nodes[nums.length-1-i].value;\n        return res;\n    }\n}\n```
[]