Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Whcih Methodology of Data Structure should be used

Posted on 2004-04-23
3
Medium Priority
?
200 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 750 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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
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 practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

618 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