girlscript / winter-of-contributing

GirlScript Winter of Contributing is a three-month-long Open-Source Program organized by🧡GirlScript Foundation to create the world's largest multilingual content repository that will be available to everyone.
MIT License
882 stars 1.57k forks source link

CP:Greedy-Job Scheduling Problem #2388

Open Ayushi2811 opened 2 years ago

Ayushi2811 commented 2 years ago

Description

Description 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. How to maximize total profit if only one job can be scheduled at a time.

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).

Constraints: 1 <= N <= 105 1 <= Deadline <= 100 1 <= Profit <= 500

Domain

Competitive Programming

Type of Contribution

Documentation

Code of Conduct

Ayushi2811 commented 2 years ago

/assign

github-actions[bot] commented 2 years ago

Hello @Ayushi2811,
Thank you for opening an issue. :octocat:
Note - Self-assigns by the original author will be prioritised by mentors manually
To get assigned to this particular issue please use /assign
Check this guide before contributing.

github-actions[bot] commented 2 years ago

This issue has been assigned to @Ayushi2811! It will become unassigned if it isn't closed within 12 days. A maintainer can also add the pinned label to prevent it from being unassigned.

Ayushi2811 commented 2 years ago

@ChetasShree I have created and self assigned this issue to me.Started working on the same