Tuesday, 15 March 2011

time complexity - Which is faster, a ternary search tree or a binary search tree? -



time complexity - Which is faster, a ternary search tree or a binary search tree? -

ternery search tree requires o(log(n)+k) comparisons n number of strings , k length of string searched , binary search tree requires log(n) comparisons why tst faster bst ?

because in ternary case log3(n) in binary case log2(n).

time-complexity binary-search-tree ternary-search-tree

No comments:

Post a Comment