progress(modules + hashmaps): finished modules and almost done hashmaps

This commit is contained in:
2026-07-26 02:09:37 +02:00
parent f0f6a72101
commit 2844976587
6 changed files with 12 additions and 53 deletions
+3 -2
View File
@@ -9,10 +9,11 @@ use std::collections::HashMap;
fn fruit_basket() -> HashMap<String, u32> {
// TODO: Declare the hash map.
// let mut basket =
let mut basket = HashMap::new();
// Two bananas are already given for you :)
basket.insert(String::from("banana"), 2);
basket.insert(String::from("apple"), 2);
basket.insert(String::from("mango"), 1);
// TODO: Put more fruits in your basket.
basket