Solved

linked list vs tree in searching permutations

Posted on 2003-11-01
3
320 Views
Last Modified: 2008-07-03
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
Comment
Question by:azcalv408
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Accepted Solution

by:
f_98 earned 125 total points
ID: 9665245
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question