Maximize funds with capital-gated projects | Apple Interview Question