completed till 11

This commit is contained in:
2025-04-02 17:54:30 +05:30
parent f980a3b381
commit 199b57aad8
4 changed files with 23 additions and 1 deletions

View File

@@ -1,6 +1,9 @@
// TODO: Define a function named `sum` that takes a reference to a slice of `u32` and returns the sum of all
// elements in the slice.
fn sum(v: &[u32]) -> u32 {
v.iter().sum()
}
#[cfg(test)]
mod tests {
use super::*;