max distance, pre-scan of LeftMin and RightMax