C# Minimum Lines
Code\n\npublic class Solution \n{\n    public int FindMaximizedCapital(int k, int w, int[] profits, int[] capital) \n    {\n        Array.Sort(capital, profits)
# Code\n```\npublic class Solution \n{\n    public int FindMaximizedCapital(int k, int w, int[] profits, int[] capital) \n    {\n        Array.Sort(capital, profits);\n        var pq = new PriorityQueue<int,int>();\n        int index = 0;\n        while(k > 0)\n        {\n            while (index < profits.Length && w >= capital[index]) \n            {\n                pq.Enqueue(profits[index], -profits[index]);\n                index++;\n            }\n            if (pq.Count == 0) return w;\n            w += pq.Dequeue();\n            k--;\n        }\n        return w;\n    }\n}\n```
['C#']