Prefix
A prefix is an initial component or sequence of a larger word, string, name, path, or other structured value.
Advanced Algorithms and Data Structures
A prefix is an initial sequence of symbols in a string that can be shared by or matched against other strings.
- How it is used
- Supports string-container queries that retrieve stored keys beginning with typed or supplied characters.
- How deep it goes
- Works through trie traversal and radix edge matching, insertion, and partial-edge lookup, including a prefix-query time bound.
- Examples
- Uses “and”, “ant”, and “anthem” as shared-prefix keys and a search box as an autocomplete scenario.
- What you can do after
- Build it from scratch using trie subtree traversal and radix-trie matching to return keys starting with a prefix.
Read how Advanced Algorithms and Data Structures explains prefix →
Acing the Certified Kubernetes Administrator Exam, Second Edition
Prefix is an Ingress path type that matches URL paths by their slash-delimited prefixes.
- How it is used
- Routes external HTTP or HTTPS requests to different internal Services through centralized Ingress path rules.
- How deep it goes
- Defines prefix matching and contrasts it with Exact, but does not descend into controller matching internals.
- Examples
- Uses /api routing as a path-based example and contrasts it with exact-path matching.
- What you can do after
- Apply it when creating Ingress rules that route URL path prefixes to Kubernetes Services.
Read how Acing the Certified Kubernetes Administrator Exam, Second Edition explains prefix →
Fabulous Adventures in Data Structures and Algorithms
A prefix is an initial substring of a word or string.
- How it is used
- Supports fast word-list lookup and completion by locating all stored words that begin with a given string.
- How deep it goes
- Explains prefix traversal, missing edges, suffix enumeration, and mutable-string handling, but does not develop prefix construction independently.
- Examples
- Uses car to produce car, care, cares, and cars from one trie node.
- What you can do after
- Apply prefix lookup through trie-backed Contains and StartsWith operations.
Read how Fabulous Adventures in Data Structures and Algorithms explains prefix →
Also covered in
- Pro ASP.NET Core 7, Tenth Edition
- Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS
- Amazon Web Services in Action, Third Edition: An in-depth guide to AWS
- Regular Expression Puzzles and AI Coding Assistants
- Outlier Detection in Python
- Tiny Python Projects: Learn coding and testing with puzzles and games
- 100 SQL Server Mistakes and How to Avoid Them
What to know first
- sorted listA sorted list is a sequence whose elements are arranged according to a defined ordering criterion.
- stringA string is a programming-language value representing textual data as an ordered sequence of characters or encoded units.
Related concepts
- linear time complexitymeasured by · Linear time complexity is an asymptotic running-time bound that grows at most proportionally to the input size, or combined input sizes, ignoring constant factors.
- pathType fieldkind of · The pathType field is an Ingress field specifying how a request path is matched for routing.
- trieuses · A trie is a tree-based data structure that stores sequences by sharing nodes for common prefixes, enabling efficient key and prefix lookup.
Questions about prefix
What is prefix?
A prefix is an initial component or sequence of a larger word, string, name, path, or other structured value.
Which Manning books explain prefix?
Advanced Algorithms and Data Structures, Acing the Certified Kubernetes Administrator Exam, Second Edition and Fabulous Adventures in Data Structures and Algorithms.
What should I know before learning prefix?
Manning books that teach prefix usually introduce sorted list and string first.
What kinds of prefix are there?
Kinds of prefix include common prefix.
What is prefix a kind of?
Prefix is a kind of pathType field. The pathType field is an Ingress field specifying how a request path is matched for routing.
What is prefix part of?
Prefix is part of code. A code is a symbolic or numeric value assigned according to defined rules to represent, identify, or encode information or a domain concept.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


