Company: ibm_11oct
Difficulty: medium
Minimum Cost to Complete Projects Problem Description A client has posted multiple web development projects on a freelancing website, and different developers have submitted bids for these projects. Given the information about project bids, determine the minimum total cost for the client to complete all projects. Return the minimum possible cost for completing all projects. If any project does not receive any bids, return -1. For example, consider the following scenario: numProjects = 5 projects. projectID = [0, 1, 2, 3, 4] projectID is aligned with bid[] The first web developer bid 6 for project 0. The second web developer bid 7 for project 0. The third web developer bid 6 for project 1. The fourth web developer bid 9 for project 2. There is only one choice of who to hire for project 3, and it will cost 7. Likewise, there is only one choice for project 4, which will cost 8. For project 0, it is optimal to hire the first web developer, instead of the fourth, and doing so will cost 6. S