PythiloHard · 40 min · Task 99 of 100 · progress kept in this browser

Weighted interval scheduling

Return the maximum reward from nonoverlapping positive-length jobs (start,end,reward). Jobs are half-open, rewards nonnegative, and touching endpoints are compatible.

from bisect import bisect_right
ends = [3, 5, 6]
start = 5
print(bisect_right(ends, start))
Your task

Return the maximum reward from nonoverlapping positive-length jobs (start,end,reward). Jobs are half-open, rewards nonnegative, and touching endpoints are compatible.