Google | Phone Screen | Job Sequencing Problem
Anonymous User
4423

Attended Google Phone screen interview for the position of software developer in October, 2021.

Question- Job Sequencing Problem
Given a set of N jobs where each job has a deadline and profit associated with it.
One job can be scheduled at a time. We earn the profit associated with job if and only if the job is completed by its deadline. Find the number of jobs done and the maximum profit.
Jobs will be given in the form (Jobid, Deadline, Profit) associated with that Job.

Example-
Input- N = 4
Jobs = {(1,4,20),(2,1,10),(3,1,40),(4,1,30)}
Output- 2 60

Explanation- Job1 and Job3 can be done with maximum profit of 60 (20+40).

Comments (10)