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).
Glossary: Coding Interviews in Rust
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).