You are viewing a single comment's thread. Return to all comments →
My rust solution
fn compareTriplets(a: &[i32], b: &[i32]) -> Vec<i32> { a.iter().zip(b.iter()).fold(vec![0,0], |mut a, b| { if b.0 > b.1 { a[0] += 1; } else if b.0 < b.1 { a[1] += 1; } a }) }
Seems like cookies are disabled on this browser, please enable them to open this website
Compare the Triplets
You are viewing a single comment's thread. Return to all comments →
My rust solution