Solved

Whcih Methodology of Data Structure should be used

Posted on 2004-04-23
3
197 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
[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 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet filter example 37 84
ejb on wildfly 5 47
How to determine if a string is a valid SHA value 7 43
CSV file parsing thru Java 13 39
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…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This video teaches viewers about errors in exception handling.

733 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