summaryrefslogtreecommitdiff
path: root/info.toml
diff options
context:
space:
mode:
authorsazid <sazidozon@gmail.com>2020-10-26 18:08:48 +0600
committersazid <sazidozon@gmail.com>2020-10-31 01:11:04 +0600
commit633c00cf8071e1e82959a3010452a32f34f29fc9 (patch)
tree688669748efc5e8c0fde691eb2428d94b2ef02cb /info.toml
parent0c12fa31c57c03c6287458a0a8aca7afd057baf6 (diff)
feat: Add HashMap exercises
Diffstat (limited to 'info.toml')
-rw-r--r--info.toml22
1 files changed, 22 insertions, 0 deletions
diff --git a/info.toml b/info.toml
index 56605a7..c52702f 100644
--- a/info.toml
+++ b/info.toml
@@ -400,6 +400,28 @@ Hint 1: `i` is each element from the Vec as they are being iterated.
Hint 2: Check the suggestion from the compiler error ;)
"""
+[[exercises]]
+name = "collections3"
+path = "exercises/collections/hashmap1.rs"
+mode = "test"
+hint = """
+Hint 1: Take a look at the return type of the function to figure out
+ the type for the `basket`.
+
+Hint 2: Number of fruits should be at least 5. And you have to put
+ at least three different types of fruits.
+"""
+
+[[exercises]]
+name = "collections4"
+path = "exercises/collections/hashmap2.rs"
+mode = "test"
+hint = """
+Use the `entry()` and `or_insert()` methods of `HashMap` to achieve this.
+
+Learn more at https://doc.rust-lang.org/stable/book/ch08-03-hash-maps.html#only-inserting-a-value-if-the-key-has-no-value
+"""
+
# MACROS
[[exercises]]