Minimum Time Spent
Problem Overview
- Determine the earliest time to finish watching at least one comedy and one drama, given each movie’s release time and duration; you can start at or after release, watch in any order, and start the second exactly when the first ends.
- Input: arrays comedyReleaseTime/duration and dramaReleaseTime/duration; 1<=n,m<=1e5, values up to 1e6. Output: minimal finishing time.
- Real-world context: scheduling on Amazon Prime Video.
- From Amazon interviews; a coding interview problem and common interview question.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
