4. University Career Fair
int
{
9
10
11
12
13
14
ALL
A team organizing a university career fair
has a list of companies along with their
respective arrival times and their duration
of stay. Only one company can present at
any time. Given each company’s arrival time
and the duration they will stay, determine
the maximum number of presentations that
can be hosted during the career fair.
15
16
17
1
18
}
19
2
20
21
22
Example
n = 5
arriva/ = [1, 3, 3, 5, 7]
duration = [2, 2, 1, 2, 1]
23
3
24
25
26
27
28
29
Select the correct answer from above options