Skip to content

Collections practice problems in Rust

Difficulty:
Category & tags Filters active
Category:
Tag:

Showing 20 of 20

Title Difficulty
BinaryHeap is a max-heap, and Reverse is the fix Medium
BTreeMap range queries Medium
Build vector, pattern-matching and map macros Medium
E0502: cannot borrow as mutable because also borrowed as immutable Easy
Group anagrams with a map Medium
Group and count words with BTreeMap entries Medium
HashMap iteration order is random Medium
How to read a borrow-check diagnostic Easy
iter, iter_mut, into_iter: all three, one Vec Easy
Joining owned strings Easy
Look up and update HashMap values Easy
Make your own collection iterable, all three ways Hard
&mut: exclusive access, and why mut appears twice Easy
Remove and return matching events with extract_if Easy
Remove matching values without invalidating iteration Medium
Set algebra with BTreeSet Easy
Sum collections and iterators with IntoIterator Medium
VecDeque and breadth-first search Easy
Vec surgery: retain, dedup and extract_if Medium
What a &mut parameter actually promises Medium