@giwmcoder Hi, the idea is to duplicate the earliest moment in out input.
Let's say, we have a input [2:00, 7:30, 14:30, 23:00], the minimal difference should be 3 hours for 2:00 and 23:00, but if we don't process the array, it will give us 21 hours instead of 3 hours.
After this step, it would become [2:00, 7:30, 14:30, 20:00, 26:00]. (26:00 is another way to represent the earliest moment 2:00), now we can handle this case successfully.
Hope it helps.