Sorting  ✅| c++ easy solution 🥳
\n    int miceAndCheese(vector<int>& reward1, vector<int>& reward2, int k) {\n        vector<pair<int,int>> v;\n        int n = reward1.size();\n        \n     
```\n    int miceAndCheese(vector<int>& reward1, vector<int>& reward2, int k) {\n        vector<pair<int,int>> v;\n        int n = reward1.size();\n        \n        for(int i=0;i<n;i++)\n            v.push_back({reward1[i]-reward2[i],i});\n        \n        sort(v.begin(),v.end());\n        \n        int ans = 0;\n        int i = n-1;\n        while(k)\n        {\n            ans+= reward1[v[i].second];\n            i--;\n            k--;\n        }\n        while(i>=0)\n        {\n            ans+= reward2[v[i].second];\n            i--;\n        }\n        return ans;\n    }\n```
['C', 'Sorting', 'C++']