Super Easy solution C# | O(n log N)
Complexity
Time complexity: O(N log N)

Space complexity: O(1)
Code

# Complexity
- Time complexity: O(N log N)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```csharp []
public class Solution {
    public int MiceAndCheese(int[] reward1, int[] reward2, int k) {
        int res = 0;
        int n = reward1.Length;
        int[] diff = new int [n];
        for(int i = 0; i < n; i++)
        {
            diff[i] = reward1[i] - reward2[i];
            res += reward2[i];
        }
        Array.Sort(diff);
        for(int i = n - 1; i >= n - k; i--)
        {
            res += diff[i];
        }
        return res;
    }
}
```
![89f26eaf70fa927a79d4793441425859.jpg](https://assets.leetcode.com/users/images/74c2c653-6c6e-41f1-8877-515f06e382cf_1737723202.210509.jpeg)

['Array', 'Greedy', 'Sorting', 'C#']