Francesco4203's blog

By Francesco4203, history, 3 years ago, In English

Hi guys, I've just learned a Trie's delete algorithm, which I believe to have a time complexity of O(n.m), where n is the length of the deleted key and m is the size of the set of characters used, as for every time we process a node, we need to check if it still has some other connections to other nodes or not, which takes O(m) time. However, almost every source says that it works in O(n) time. Can anyone please explain to me? Thank you for reading, have a nice day!

Full text and comments »

  • Vote: I like it
  • -3
  • Vote: I do not like it