Give time slots of interviewers and interviewees. Each interviewee takes one interview; interviewers can take arbitrarily many if available. Schedule interviews for as many interviewees as possible.
Input1: {Interviewer1: [[t1, t2], [t3, t4]...], interviewer2: [[t5, t6], [t7, t8]...]}
Input2: {Interviewee1: [[te1, te2], [te3, te4]...], interviewee2: [[te5, te6], [te7, te8]...]}
Interview_time = T
Output: [[interviewer1, interviewee2, [t1, t1+T]]....]
e.g.
Input1: {'john': [[1,3], [4,8]], 'tom': [[3,5], [9,11]]}
Input2: {'jerry': [[2,3], [11,12]], 'jimmy': [[7,9], [12,14]], 'josh': [[1,2]]}
Interview_time = 1
Output: [['john', 'jerry', [2,3]], ['john', 'jimmy', [7,8]]], ['john', 'josh', [1,2]]]
I talked about greedy and segment tree, but did not help solve this problem; got rejected after this phone interview.