Easy solution| o(Nlogn) | dictionary  |
\n\tsol=[]\n        dic={}\n        for i in sorted(nums)[-k:]:\n            dic[i]=dic.get(i,0)+1\n        for i in nums:\n            \n            if i in di
```\n\tsol=[]\n        dic={}\n        for i in sorted(nums)[-k:]:\n            dic[i]=dic.get(i,0)+1\n        for i in nums:\n            \n            if i in dic and dic[i]>0:\n                sol.append(i)\n                dic[i]-=1\n        return sol\n    \n```
['Python']