44.8k views
1 vote
You are given a collection of distinct strings having lengths respectively .

Each string only contains characters from the English alphabet. Consequently, the strings DO NOT end in the unique symbol $, and they are not necessarily prefix-free.
We create a trie out of the strings. Match the following:
Group of answer choices
The minimum number of leaves in the trie
[ Choose ]
The maximum number of leaves in the trie
[ Choose ]
The minimum number of nodes in the trie
[ Choose ]
The maximum number of nodes in the trie
[ Choose ]
The maximum number of children a node has
[ Choose ]
The depth of the trie, i.e., the maximum number of nodes on any root to leaf path
[ Choose ]
If we search a pattern of length p, where 0 < p <= k, in the trie, then the minimum number strings it can match are
[ Choose ]
If we search a pattern of length p, where 0 < p <= k, in the trie, then the maximum number strings it can match are
[ Choose ]
options --(1+2+3+4+....+k)
k-p+1
1
k
0
26
1+k

User Sastrija
by
7.4k points

1 Answer

4 votes

The match up are:

  1. The minimum number of leaves: Number of strings.
  2. The maximum number of leaves: Total number of characters in all strings.
  3. The minimum number of nodes: Total number of characters in all strings.
  4. The maximum number of nodes: Total number of characters in all strings plus one.
  5. The maximum number of children a node has: Size of the English alphabet.
  6. The depth of the trie: Length of the longest string.
  7. Minimum number of matching strings for a pattern of length p: 1 or the number of strings with a common prefix.
  8. Maximum number of matching strings for a pattern of length p: Total number of strings.
User Afonte
by
8.0k points

No related questions found