Solved

Whcih Methodology of Data Structure should be used

Posted on 2004-04-23
3
195 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 AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Checkbox and ListView in Android Layout 4 65
Java Server Faces parameter pass? 6 50
eclipse buid path vs tomcat lib path 10 23
Is there a simpler dropbox system? 10 21
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
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…
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 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.

773 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