Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 339
  • Last Modified:

linked list vs tree in searching permutations

Hello, can someone help me figure out how long a run to search for permutations of a ten character string might take if a linked list, not a tree, was used to store a set of words (about 349900 words). Operation count ?
0
azcalv408
Asked:
azcalv408
1 Solution
 
f_98Commented:
you can't compute for a constant run time;someone correct me if i'm wrong, but i believe the searching an unordered list  has a worst case scenario of O(n) and best case scenario of O(1). while a ternary search tree would give you a worst case of O(log(n) + k) where k is the length of the string. now if you have an ordered list, that will make it way faster to search; something like O(log n)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now