2458. Find Minimum Time to Finish All Jobs II

Medium
Array
Greedy
Sorting

Description

Hints

Hint 1
It is always optimal to pair the worker with the least amount of time with the job that requires the least amount of time.
Hint 2
Sort both arrays.

Statistics

Acceptance
66.0%
Submissions
19,056
Accepted
12,580