Skip to content

Slices practice problems in Rust

Difficulty:
Category:
Tag:

Showing 16 of 16

Status Title Difficulty
AsRef, Borrow, and signatures your callers can actually use Medium
Bounds checks: when they cost, and five safe ways to remove them Hard
E0499: cannot borrow as mutable more than once Medium
Extension traits: adding methods to types you do not own Medium
Indexing in a loop is usually a borrow-checker workaround — and clippy knows Medium
iter_mut(): mutating every element without ever holding two &mut Medium
Memory layout and cache behaviour: flat arrays, AoS vs SoA Medium
&mut: exclusive access, and why `mut` appears twice Easy
Non-lexical lifetimes: a borrow ends at its last use Easy
Slice and array patterns, and rest @ .. Medium
Slices are borrows Easy
Slices &[T]: the shape that unifies arrays and Vec Medium
split_at_mut and the disjointness-proof APIs Medium
Splitting borrows: implement `split_at_mut` Medium
Vec<T>: the growable one Easy
windows and chunks are slice methods, not iterator adapters Medium