Question: You have homework due in n classes. It will take you t hours to complete your homework for class i, which will carn you gi

 You have homework due in n classes. It will take you

You have homework due in n classes. It will take you t hours to complete your homework for class i, which will carn you gi points (otherwise you carn no points for that homework). All of your homework is due in T hours. Give an efficient algorithm (either Dynamic Programming or Greedy) to maximize the number of points you carn, and analyze the runtime. If you solve this problem using Greedy, then give an exchange argument to prove the correctness of your algorithm

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!