Блог пользователя Francesco4203

Автор Francesco4203, история, 3 года назад, По-английски

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!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -3
  • Проголосовать: не нравится