You are viewing a single comment's thread. Return to all comments →
my solution in rust:
fn birthday(s: &[i32], d: i32, m: i32) -> i32 { s.windows(m as usize) .filter(|&window| window.iter().sum::<i32>() == d) .count() as i32 }
Seems like cookies are disabled on this browser, please enable them to open this website
Subarray Division
You are viewing a single comment's thread. Return to all comments →
my solution in rust: