Question: Please use c++ A greedy algorithm always makes the choice that looks best at this moment You are working as a programmer for a part-time

Please use c++ A greedy algorithm always makes the choice that looks best at this moment

Please use c++ A greedy algorithm always makes the choice that looks

You are working as a programmer for a part-time job app. This app contains the list of N jobs, each job j_i contains the start time s_i (24-hour format), duration d_i and difficulty level li, where each job pays M dollars. You have to add a feature here such that any user can input a time range A to B (24-hour format) for the day, e.g., 10 to 18 , and the app will recommend jobs within that time range such that his earning is maximized. You guessed right, you can 't do two jobs at the same time. A. Take the list of N jobs, M,A and B as input. B. Write a program to recommend jobs for the above scenario using a greedy 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!