Solved

Whcih Methodology of Data Structure should be used

Posted on 2004-04-23
3
192 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Suggested Solutions

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

743 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

17 Experts available now in Live!

Get 1:1 Help Now