Python short and clean. Greedy. Two heaps (PriorityQueues).
Approach\nTLDR; Same as Official solution, except another heap is used instead of sorting the projects.\n\n# Complexity\n- Time complexity: O(n * log(n))\n\n- S
# Approach\nTLDR; Same as [Official solution](https://leetcode.com/problems/ipo/solutions/2959870/ipo/), except another heap is used instead of sorting the projects.\n\n# Complexity\n- Time complexity: $$O(n * log(n))$$\n\n- Space complexity: $$O(n)$$\n\nwhere, `n is the number of projects`.\n\n# Code\n```python\nclass Solution:\n    def findMaximizedCapital(self, k: int, w: int, profits: list[int], capital: list[int]) -> int:\n        pool = list(zip(capital, profits)); heapify(pool)\n        available = []\n\n        cap = w\n        for _ in range(k):\n            while pool and pool[0][0] <= cap:\n                _, p = heappop(pool)\n                heappush(available, -p)\n            if not available: break\n            cap += -heappop(available)\n        return cap\n\n\n```
['Greedy', 'Sorting', 'Heap (Priority Queue)', 'Python', 'Python3']