Finding the earliest time when a frog can jump to the other side of a river.