[prev] 44 [next]

Preprocessing Strings (cont)

Complexity of standard tries:
  • O(n) space
  • insertion and search in time O(m)
    • n … total size of text  (e.g. sum of lengths of all strings in a given dictionary)
    • m … size of the string parameter of the operation  (the "key")