Find longest segment with endpoints > interior | Amazon