Skip to content

Commit 03b747f

Browse files
committed
Fix scheduling/job_sequencing_with_deadline.py
1 parent cbe4cc5 commit 03b747f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: scheduling/job_sequencing_with_deadline.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
def job_sequencing_with_deadlines(num_jobs: int, jobs: list) -> list:
1+
def job_sequencing_with_deadlines(jobs: list) -> list:
22
"""
33
Function to find the maximum profit by doing jobs in a given time frame
44
55
Args:
6-
num_jobs [int]: Number of jobs
76
jobs [list]: A list of tuples of (job_id, deadline, profit)
87
98
Returns:
109
max_profit [int]: Maximum profit that can be earned by doing jobs
1110
in a given time frame
1211
1312
Examples:
14-
>>> job_sequencing_with_deadlines(4,
13+
>>> job_sequencing_with_deadlines(
1514
... [(1, 4, 20), (2, 1, 10), (3, 1, 40), (4, 1, 30)])
1615
[2, 60]
17-
>>> job_sequencing_with_deadlines(5,
16+
>>> job_sequencing_with_deadlines(
1817
... [(1, 2, 100), (2, 1, 19), (3, 2, 27), (4, 1, 25), (5, 1, 15)])
1918
[2, 127]
2019
"""

0 commit comments

Comments
 (0)