Loading Company...
This is a verified interview question from Inmobi. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "IPO" covers key patterns like DP.
"You are given n projects, where the ith project has a pure profit of profit[i] and a minimum capital of capital[i] is required to start the same. Initially you have w capital. Whenever you complete a project, you will obtain its pure profit and the same would be added to your capital. Pick a list of at most k distinct projects from the given projects to maximise your final capital, and return the final maximised capital."
Join thousands of developers practicing for Inmobi.