Skip to content

Glossary: Coding Interviews in Rust

sort_by_key

Also written: sort, sort_unstable, stable sort

Rust's way to sort by a chosen field, with a closure picking the key. It is a stable sort (equal items keep their order) and costs O(n log n).

Where the book teaches it

Related terms

ClosureInterval