next

Function next 

Source
fn next(slice: &[i32], n: i32) -> i32
Expand description

Calculate the change in distance moving down or right. The slice is sorted so we can use binary search instead of a linear scan.