beats 100% java solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int miceAndCheese(int[] reward1, int[] reward2, int k) {\n        int n=reward1.length;\n        int[]a=new int[n];\n        int res=0;\n        for(int i=0;i<n;i++){\n            a[i]=reward1[i]-reward2[i];\n            res+=reward2[i];\n        }\n        Arrays.sort(a);\n        reverse(a);\n        for(int i=0;i<k;i++)\n            res+=a[i];\n        return res;        \n    }\n    public void reverse(int[]a){\n        int n=a.length;\n        int i=0,j=n-1;\n        while(i<j){\n            int t=a[i];\n            a[i]=a[j];\n            a[j]=t;\n            i++;\n            j--;\n        }\n    }\n}\n```
['Sorting', 'Java']