Skip to content

Glossary: Algorithms Beyond the Basics in Rust

entry / or_default

Also written: entry, or_default

A `HashMap` pattern that finds a key's value or creates an empty one if the key is missing, such as the first road seen for a place. It is also how a trie adds a node for a new letter.

Where the book teaches it

Related terms

Adjacency listTrie