Year End Sale: Get Upto 40% OFF on Live Training! Offer Ending in
D
H
M
S
Get Now

Java: Job Sequencing Problem

Level : Intermediate
Mentor: Shailendra Chauhan
Type : GuidedLab
Points : 10
Duration : 00:30:00

Lab Details

Problem Statement:

Given an array of jobs where every job has a deadline and associated profit if the job is finished

before the deadline. It is also given that every job takes a single unit of time, so the minimum

possible deadline for any job is 1. Maximize the total profit if only one job can be scheduled at

a time..

Example

Input:

Four Jobs with following deadlines and profits

JobID Deadline Profit

a     4     20

b     1     10

c     1     40

d     1     30

Output:
Following is maximum profit sequence of jobs: c, a
Self-paced Membership
  • 24+ Video Courses
  • 825+ Hands-On Labs
  • 400+ Quick Notes
  • 125+ Skill Tests
  • 10+ Interview Q&A Courses
  • 10+ Real-world Projects
  • Career Coaching Sessions
  • Email Support
Upto 60% OFF
Know More
Still have some questions? Let's discuss.
CONTACT US
Accept cookies & close this