Python3 Solution
\n\nclass Solution:\n    def findMaximizedCapital(self, k: int, w: int, profits: List[int], capital: List[int]) -> int:\n        max_profit=[]\n        min_capi
\n```\nclass Solution:\n    def findMaximizedCapital(self, k: int, w: int, profits: List[int], capital: List[int]) -> int:\n        max_profit=[]\n        min_capital=[(c,p) for c,p in zip(capital,profits)]\n        heapq.heapify(min_capital) \n        for i in range(k):\n            while min_capital and min_capital[0][0]<=w:\n                c,p=heapq.heappop(min_capital) \n                heapq.heappush(max_profit,-1*p)\n            if not max_profit:\n                break\n            w+=-1*heapq.heappop(max_profit)\n        return w                 \n```
['Python', 'Python3']