Cinema Shows
SDE II
A prominent media company (AMZ MGM) has partnered with select theaters to showcase exclusive video content, including feature films, episodic series, live performances, and more.
You are given an integer n, representing the number of scheduled screenings. Each screening has a start time, duration, and expected audience size, which are provided as integer arrays start, duration, and volume, respectively.
Your task is to determine the highest possible total audience size while ensuring that no two selected screenings overlap. Two screenings are considered non-overlapping if one fully concludes before the next one begins.
Complete the function cinemaShows in the editor below.
cinemaShows has the following parameter(s):
int start[n]: an integer array denoting the start times of each showint duration[n]: an integer array denoting the durations of each showint volume[n]: an integer array denoting the volumes of each show
Returns
int: an integer denoting the maximum possible volume that can be received
1Example 1

2Example 2
Constraints
Limits and guarantees your solution can rely on.
1 ≤ n ≤ 10^51 ≤ start[i] ≤ 10^91 ≤ duration[i] ≤ 10^91 ≤ volume[i] ≤ 10^3