Skip to content

Allocation practice problems in Rust

Difficulty:
Category & tags Filters active
Category:
Tag:

Showing 15 of 15

Title Difficulty
ASCII search without lowercase copies Easy
Build a byte index with one allocation Easy
Build a CSV record with one output buffer Easy
Build a report with a reusable string buffer Medium
Chains versus loops: top-k, and a function that must not allocate Medium
Cow: borrow until you have to own Medium
Delegate shape methods through an enum Medium
Filter records without cloning their tags Medium
Remove and return matching events with extract_if Easy
Reserve output space and report iterator size hints Medium
Reusing buffers instead of allocating per iteration Medium
Sorting: sort vs sort_unstable vs sort_by_cached_key Medium
Store and transpose a grid in one flat buffer Medium
Where the allocations are: the counting allocator Easy
Zero-copy parsing: borrow, don't allocate Medium