Help needed in ctime (Solved)

I want to know what is wrong in my python code for the question CTIME. My submission is solution. Thanks.

Did you handle the cases where chef is being monitored by more than one invigilator at any particular instance of time?

e.g. invigilator 1: start = 0 , end = 50
invigilator 2 : start = 10, end = 60

You will need to merge these intervals if you’ve not already done

I’ve done that. I have basically kept track of what end point it will be after merging, so in this case first end will be 50 and after 2nd invigilator end will be 60 and the difference of 10 will also be added into account.

May be you should check this test case

2 5 10
0 10
0 5

1 Like

Thanks bro, I understood.