Rust ETL exercise is a bit odd?

I’ve just finished the ETL exercise on the Rust track and… it confused me a bit. I thought I could share my thoughts here.

First, the exercise has a very straightforward and short solution, even easier than some Easy-level exercises. Yet it has Medium difficulty, which looks odd to me. I would say that it definitely belongs in Easy.

Second, does this exercise really need to employ a BTreeMap as an input and output type? A simple HashMap would work exactly the same here, wouldn’t it? At first it was even misleading because I started to think about the differences between HashMap and BTreeMap, spent some time reading the docs (which is always good, of course). From what I understand it seems like BTreeMap indeed suits better for the given data structure, but there’s nothing specific about it that could affect the solution. Wouldn’t it be better to simply use HashMap, a more basic collection?

(I hope this is the right forum category for this post.)

I changed the category as this is a Rust-specific question (that I can’t answer, sorry).

2 Likes

Thanks Glenn. I’m only subscribed to the Rust category, so I wouldn’t have seen it otherwise :smile:

For reference, the PR where the difficulty was changed from 1 to 4 is here:

I’m not inclined to change the difficulty of an exercise, it’s a subjective topic.

About the BTreeMap, I agree that I would make the exercise with a HashMap today, but I don’t think this is enough of an issue to break existing solutions. If people know about the difference between the two, they won’t think twice about it. Otherwise it might lead them to read up on the difference like you did, which is also a good thing.

soo… wontfix :smile: