The gap that wraps round midnight
transcript
Two orders. One at the very end of the day. One at the very start. Your scan says they are far apart. It is wrong.
The times are one and eighty-six thousand three hundred ninety-nine. A neighbour scan sees one pair. It reports eighty-six thousand three hundred ninety-eight.
A day has eighty-six thousand four hundred seconds. After midnight, the clock starts again. So the last time is a neighbour of the first.
The plain scan gives eighty-six thousand three hundred ninety-eight. Add the wrap gap: first time, plus a day, minus last time. That gives two.
The plain scan says eighty-six thousand three hundred ninety-eight. With the wrap gap, the answer is two. A day has eighty-six thousand four hundred seconds.
Start the best value at the wrap gap. Then scan the neighbours. Keep the smallest of all.
Check the wrap on every clock problem. Start from the wrap gap. Full breakdown in the lecture.