One-dimensional nearest point pair