⌘K
Flycodx

Ravi's Maximum Earnings Project Selection

Ravi's Maximum Earnings Project Selection

HardArrays0% accepted

Ravi is a freelancer in Bangalore using Upwork to find projects. Each project has a deadline and payment amount. He can only work on non-overlapping projects simultaneously. Find the maximum earnings by optimally selecting projects.

Approach

Given projects [[deadline, payment]], find the maximum earnings from non-overlapping projects he can complete.

Input

[[10,50],[5,30],[20,70],[15,40]]

Output

70
solution.py
Loading editor...
Test 1
Test 2
Test 3

Press Run to test your custom input, or Submit to judge against all test cases.

Sign in to continue

Create a free account to run code, submit solutions and track progress.

  • Free forever — no credit card
  • 10+ languages with live execution
  • Points, streaks & leaderboards
Auto Save OnLn 1, Col 1Spaces: 4UTF-8LFPython 3