You are viewing a single comment's thread. Return to all comments →
In RUST
fn breakingRecords(scores: &[i32]) -> Vec<i32> { let mut highest = scores[0]; let mut lowest = scores[0]; let mut count_highest = 0; let mut count_lowest = 0; for &score in scores.iter() { if score > highest { highest = score; count_highest += 1; } else if score < lowest { lowest = score; count_lowest += 1; } } vec![count_highest, count_lowest] }
Seems like cookies are disabled on this browser, please enable them to open this website
Breaking the Records
You are viewing a single comment's thread. Return to all comments →
In RUST