From 9425070b2ee83ee94483242e512ed1246798e84c Mon Sep 17 00:00:00 2001 From: Michele Sessa Date: Wed, 12 Oct 2022 11:25:06 +0100 Subject: [PATCH] feat(simple_hash): rewrite exercise completely improve the way students are introduced to hash maps --- subjects/simple_hash/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subjects/simple_hash/README.md b/subjects/simple_hash/README.md index 9665e35d3..dbf628714 100644 --- a/subjects/simple_hash/README.md +++ b/subjects/simple_hash/README.md @@ -6,14 +6,14 @@ Create a **function** named `word_frequency_counter` which will receive a vector Also create a function named `nb_distinct_words` which will take a reference to the `HashMap` and return the number of distinct words present in it. +> all the words tested will be lowercase ### Expected functions ```rust pub fn word_frequency_counter(words: Vec<&str>) -> HashMap<&str, usize> {} -pub fn nb_distinct_words(frequency_count: &HashMap<&str, usize>) -> usize { -} +pub fn nb_distinct_words(frequency_count: &HashMap<&str, usize>) -> usize {} ``` ### Usage