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.