Question 66
Which data structure is particularly suitable for prefix-based string lookup?
A trie organizes keys by character prefixes.
Which data structure is particularly suitable for prefix-based string lookup?
A trie organizes keys by character prefixes.
What is the time complexity of searching for a string of length L in a trie, ignoring alphabet lookup cost?
One trie level is processed for each character.
Which tree is commonly used to implement ordered dictionaries with guaranteed logarithmic height?
AVL trees maintain strict height balance.
Which tree uses coloring constraints to guarantee O(log n) height?
Red-black invariants bound the height logarithmically.
Which statement about a binary tree with n nodes is always true?
Every tree with n vertices has exactly n-1 edges.