From 1e54bc61e81a81b0647325f724690b376de50a2a Mon Sep 17 00:00:00 2001 From: Sateesh Basavaraju Date: Fri, 4 Jun 2021 16:09:12 +0530 Subject: feat: Add hashmap3 exercise. --- info.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'info.toml') diff --git a/info.toml b/info.toml index c54672b..ec2d817 100644 --- a/info.toml +++ b/info.toml @@ -506,6 +506,18 @@ 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 """ +[[exercises]] +name = "hashmaps3" +path = "exercises/hashmaps/hashmaps3.rs" +mode = "test" +hint = """ +Hint 1: Use the `entry()` and `or_insert()` methods of `HashMap` to insert entries corresponding to each team in the scores table. +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 +Hint 2: If there is already an entry for a given key, the value returned by `entry()` can be updated based on the existing value. +Learn more at https://doc.rust-lang.org/book/ch08-03-hash-maps.html#updating-a-value-based-on-the-old-value +""" + + # TEST 2 [[exercises]] -- cgit v1.2.3