Math, asked by akae4372, 11 months ago

Youre given n shows, each with a fixed start time (s) and an end time (e). Each show is telecasted on a different channel. Find the total duration during which at least one show is being telecasted.

Answers

Answered by Anonymous
6

Answer:

Input: arrl[] = {1, 2, 9, 5, 5}

exit[] = {4, 5, 12, 9, 12}

First guest in array arrives at 1 and leaves at 4,

second guest arrives at 2 and leaves at 5, and so on.

Output: 5

There are maximum 3 guests at time 5.

Answered by YasheekaRajput
7

maximum 3 guest at time 5.

Similar questions