CodeMosa
Master LeetCode Patterns
All Patterns
Collections
Sign In
Back
Trie (Prefix Tree)
Question 1 of 12
8% Complete
Easy
What's the time complexity to check if a string has a prefix in a Trie with alphabet size σ?
A
O(m)
B
O(m log σ)
C
O(log m)
D
O(σ)