educative.io

Educative

Recommended additional test case

I think more test cases would help here. My first solution passed the two test cases provided but failed this one.

print("Intervals Intersection: " + str(merge([[0,2],[5,10],[13,23],[24,25]],[[1,5],[8,12],[15,24],[25,26]])))

The expected output is [[1,2],[5,5],[8,10],[15,23],[24,24],[25,25]].

2 Likes