You are given the availability for 2 people, where the availability for each person is represented by a 2d array (e.g. avail[i][0] is start time and availA[i][1] is the end time for the ith availability of person A). Also, the duration of a meeting is given. Write a method to return the earliest start time for hosting the meeting between the two.

input:

availA: {[0,15], [25, 50]} (person A is available from 0 to 15, from 25 to 50)

availB: {[10, 100]} (person B is available from 10 to 100)

duration: 20

output: 25