prev

Function prev 

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

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