← Back to experiences
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/experiences/…$
The interview started with ML theory questions which I answered well. I found the following question to be quite challenging. Given calendars of two people, return the list of open slots from both calendars. The calendars need not necessarily be sorted. I kept switching back and forth between calculating empty and busy slots and felt lost after a while. Times are represented as floating point numbers in the range [0.0-24.00]. You can assume the day starts at 0.0 and ends at 24.00, so all open slots in that range should be calculated.
Example: p1 = [[8.0-9.0], [10.0-11.5], [11.5-12.5]] p2 = [[3.5-4.5] , [2.5-3.5], [9.0-10.0], [10.0-10.5]] output = [[0.0-8.0], [12.5-2.5], [4.5-24.0]