?
Solved

linked list vs tree in searching permutations

Posted on 2003-11-01
3
Medium Priority
?
331 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 500 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
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 about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

764 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