What is the worstcase runtime for checking whether a trie co

What is the worst-case runtime for checking whether a trie contains a particular string?

a - O(n), where n is the number of nodes in the trie

b - O(n), where n is the number of strings that have been inserted into the trie

c - O(n), where n is the length of the string we\'re searching for

d - O(1)

Solution

Option a is correct choice.

What is the worst-case runtime for checking whether a trie contains a particular string? a - O(n), where n is the number of nodes in the trie b - O(n), where n

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site