Problem 502 · Hard

IPO

Sort projects by capital; greedily push affordable profits into a max-heap and pick the best each round.

Open the interactive visualisation