Python 3 || 7 lines, heap   || T/S: 96% / 48%
\nclass Solution:\n    def findMaximizedCapital(self, k: int, w: int, profits: List[int], \n                                         capital: List[int]) -> int:
```\nclass Solution:\n    def findMaximizedCapital(self, k: int, w: int, profits: List[int], \n                                         capital: List[int]) -> int:\n\n        heap = []\n        projects = sorted(zip(capital, profits),\n                                       key=lambda x: x[0], reverse=True)\n\n        for _ in range(k):\n            while projects and projects[-1][0] <= w:\n                heappush(heap, -projects.pop()[1])\n\n            if heap: w-= heappop(heap)\n\n        return w\n```\n[https://leetcode.com/problems/ipo/submissions/1270885097/](https://leetcode.com/problems/ipo/submissions/1270885097/)\n\n\n\nI could be wrong, but I think that time complexity is *O*(*N* log *N* + *K* log *N*) and space complexity is *O*(*N*), in which *N* ~ `len(projects)` and *K* ~ `k`
['Python3']