You start with initial funds W and may undertake at most K projects. Each project i has a required capital C[i] and yields profit P[i]; you can only start project i if your current funds are at least C[i], and upon completion your funds increase by P[i]. Choose up to K projects to maximize your final funds. Design an efficient algorithm, specify the data structures, analyze time and space complexity, and justify correctness. Discuss how your solution scales when N is as large as 2e5.