Interview concept

What is a trie (prefix tree)?

A trie, or prefix tree, stores strings along paths of characters so that words sharing a prefix share nodes. It supports prefix search, autocomplete, and dictionary lookups in time proportional to word length.

Summary

Key takeaways

Tries (prefix trees) - Interview Concepts - ExtraBrain is part of ExtraBrain's local-first Mac workflow for live interviews, meetings, transcription, provider control, and responsible AI use.

Page focus

A trie, or prefix tree, stores strings along paths of characters so that words sharing a prefix share nodes. It supports prefix search, autocomplete, and dictionary lookups in time proportional to word length.

Platform fact

ExtraBrain has 1 current public platform family, macOS, with support for 2 Mac CPU families: Apple Silicon and Intel.

Data-flow fact

ExtraBrain has 3 configurable data paths to review before sensitive work: local Parakeet transcription, local Gemma 4 where installed and compatible, and external providers you choose.

Interview concept

How it works

Structure

Each node represents a character, a path from the root spells a prefix, and a flag marks a complete word.

Complexity

Insert and search take O(L) for a word of length L, independent of how many words are stored.

When to use it

Reach for a trie on autocomplete, prefix matching, and word-search problems.

Interview concept

Responsible use

Use any live AI assistant only where interview, workplace, school, and platform rules allow it. Do not use generated answers to misrepresent your skills, experience, or authorship.

FAQ

Common questions.

Short answers for people and crawlers comparing ExtraBrain with other live AI assistants.

When should I use a trie over a hash map?

Use a trie when you need prefix queries or ordered traversal; a hash map is better for exact-match lookups only.

What is the space cost of a trie?

Tries can use significant memory because of per-character nodes, though a compressed radix tree reduces it.