Iranna Patil
Mar 6, 2023

--

Actually the worst case time complexity of the solution is O(n square), as adding element to a array list is O(n) in worst case, so merging time complexity is O(n * n).

A better solution can be found

https://medium.com/@iranna-patil/find-free-times-of-employees-a6f9d412a50d

Hope this helps.

--

--

Iranna Patil
Iranna Patil

No responses yet