Skip to content

Collections practice problems in Rust

Difficulty:
Category:
Tag:

Showing 20 of 20

Status Title Difficulty
BinaryHeap is a max-heap, and Reverse is the fix Medium
BTreeMap range queries Medium
Building std's macros: vec!, matches!, a HashMap literal Medium
E0502: cannot borrow as mutable because also borrowed as immutable Easy
Grouping without itertools: anagram buckets Medium
HashMap fundamentals: get, get_mut and the Hash/Eq contract Easy
HashMap iteration order is random Medium
How to read a borrow-check diagnostic Easy
In-place mutation vs rebuild, measured Easy
IntoIterator: one bound that accepts five containers Medium
Iterator invalidation, and the bug class that stopped existing Medium
iter, iter_mut, into_iter: all three, one Vec Easy
Joining owned strings Easy
Make your own collection iterable, all three ways Hard
&mut: exclusive access, and why `mut` appears twice Easy
Set algebra with BTreeSet Easy
The Entry API: one lookup, not two Medium
VecDeque and breadth-first search Easy
Vec surgery: retain, dedup and extract_if Medium
What a &mut parameter actually promises Medium