You are viewing a single comment's thread. Return to all comments →
My rust solution:
fn minimumAbsoluteDifference(arr: &mut [i32]) -> i32 { arr.sort(); arr.windows(2) .map(|window| (window[0] - window[1]).abs()) .min() .unwrap()
Seems like cookies are disabled on this browser, please enable them to open this website
Minimum Absolute Difference in an Array
You are viewing a single comment's thread. Return to all comments →
My rust solution: