539. Minimum Time Difference

time difference is also a circular problem, so just append data with 24hours again, it works

sort + circular array

T: O(nlogn)

S: O(n)

sort

or just calculate last one and first one case

bucket

T: O(n), n is size of timePoints

S: O(1)

Last updated

Was this helpful?