Solved

Whcih Methodology of Data Structure should be used

Posted on 2004-04-23
3
193 Views
Last Modified: 2010-03-31
I am woking on an Assigment.
The Problem is to Create a Comptuer Based Dictionary of English Language using any of the Data Stucture Technique.

I am in the planning phase of it.

My Question is which data stucture technique will be simple and easy to implement.
Tree, Bianry Tree, Ques, Stack or any other simple type.

I have very limited time for doing so. Plz suggest as early as possible. If u could send me any sample code. Then it will be again a great help for me.

Thanks

Ahmer
0
Comment
Question by:ahit
3 Comments
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 10906292
It really depends on what kind of behavior your looking for. E.g. constant lookup time vs. constant insertion time etc. Think in terms of what you need the data source to be able to do for you in order to solve your problem, then find the data structure which supports it.
0
 
LVL 2

Accepted Solution

by:
timbauer earned 250 total points
ID: 10906410
A dictionary is a pretty big structure.
The problem sounds like it would be solved easily with a Map or some sort.
A mapping of words to their definitions.

If you want to be able lookup a definition given a word, I would recommend a HashMap.
Elements are accessed in O(1) time. However, the tradeoff, is a chaotic ordering.
If you want things in order, you probably want a TreeMap. The keys (the words) are in sorted
order and you can browse them easily. The cost is still a respectible O(lg N). The call is yours to make.


Regards,
- Tim
0
 
LVL 23

Expert Comment

by:rama_krishna580
ID: 10906954
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 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:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

911 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

21 Experts available now in Live!

Get 1:1 Help Now