Solved

linked list vs tree in searching permutations

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now