c++ - Double array trie vs. radix trie. Which one performs better when talking about time complexity? -
i have learned radix trie , double array trie wikipedia , document, found out 2 have similiar behavior when inserting , looking vocabularies. wonder 1 faster when inserting vocabularies , checking if vocabulary exists (i don't care deletion).
i think when talking looking vocabularies, radix trie faster double array trie because has less node traverse. double array trie's memory continuous, might has improve performance because can traverse faster.
the inserting time of double array trie slower radix trie because has relocate step if collision occurs.
please tell me if analysis right or misunderstood something. , (also of import of all) if have case has more looking inserting, 1 may perform better? in other words, if want check if random vocabulary exist in article, construction better? ^_^ (don't care deletion , memory complexity, time)
(sorry poor grammar ><)
c++ c algorithm time compare
No comments:
Post a Comment