You may finish at most k distinct projects before an IPO. Project i needs at least capital[i] capital to start and adds a pure profit of profits[i] to your capital when finished. You start with capital w. Pick at most k projects to maximize your final capital and return it.
You may finish at most k distinct projects before an IPO. Project i needs at least capital[i] capital to start and adds a pure profit of profits[i] to your capital when finished. You start with capital w. Pick at most k projects to maximize your final capital and return it.