You are viewing a single comment's thread. Return to all comments →
My Rust approach:
fn countingSort(arr: &[i32]) -> Vec { let mut my_vec: Vec = vec![0; 100];
for var in arr { if let Some(x) = my_vec.get_mut(*var as usize) { *x += 1; } } my_vec
} `
Seems like cookies are disabled on this browser, please enable them to open this website
Counting Sort 1
You are viewing a single comment's thread. Return to all comments →
My Rust approach:
fn countingSort(arr: &[i32]) -> Vec { let mut my_vec: Vec = vec![0; 100];
} `