Started with ML Theory Questions which I answered well
Found the following questin pretty hard. Not sure if leetcode has a similar question. Appreciate if anyone can solve it or link to relevant questions.
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.
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]