C# two pointer
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```\npublic class Solution {\n    public int MaxProfitAssignment(int[] difficulty, int[] profit, int[] worker) {\n        Array.Sort(difficulty, profit);\n        Array.Sort(worker);\n        \n        int i = 0, j = 0, maxpro = 0, res = 0;\n        \n        while(j < worker.Length)\n        {\n            if(i < difficulty.Length && difficulty[i] <= worker[j])\n            {\n                maxpro = Math.Max(maxpro, profit[i]);\n                i++;\n            }\n            else\n            {\n                res += maxpro;\n                j++;\n            }\n        }\n        return res;\n    }\n}\n```
['C#']