Solved

linked list vs tree in searching permutations

Posted on 2003-11-01
3
317 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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
hibernate jars 4 45
Tomcat: Unable to run tomcat service. 2 23
java imports not found 4 27
Notify sent to other threads in Java 9 33
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

828 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