Compute unique duration by merging intervals | Nuro Interview Question