Amazon Prime Video has movies in the category 'comedy' or 'drama'. Determine the earliest time you can finish at least one movie from each category. The release schedule and durations of the movies are provided. You can start watching a movie at the time it is released or later. If you begin a movie at time t, it ends at time t + duration. If a movie ends at time t + duration, the second movie can start at that time, t + duration, or later. The movies can be watched in any order.
Example:
comedyReleaseTime = [1, 4]
comedyDuration = [3, 2]
dramaReleaseTime = [5, 2]
dramaDuration = [2, 2]
Duration and release times are aligned by index.