implementation of Computer Dictionary

Posted on 2004-04-24
Last Modified: 2010-05-18
Now a days i have a task to do related to the implementation of Computer dictionary using any data structures. i am an intermediate programmer and also want to finish it off as quickly as possible, so would u plz tell me which data structure i should use to implement the above said concept. i have studied stacks, queues, linked list, trees. i am also planing to use the File concept. if u can help me in shape of any sample code, that would be even better...

with Regards,


Question by:ahit
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
  • 2

Accepted Solution

ankuratvb earned 125 total points
ID: 10907339
It depends to what depth you want to approach the problem.

The simplest would be create word-definition pairs and store in two double dimensional arrays.

Then,according to the word entered,find the corresponding meaning by looking up the corresponding index on the definition array.

If you keep the word-defn pairs sorted on word,you can do binary search to improve search speed.

for e.g.

lets say,you find the word wanted at word[102];
the defn would be defn[102];

Store the words and meaning in a file and load them into this array at program startup.
You could also store the number of words as well.
Then you can define your array length dynamincally using malloc().

For another idea using trees,see here:

Expert Comment

ID: 10919743
Another idea would be to use a hash table. Although I myself have not had any experience with them but I hear that
it is quite helpful in store and search kind of applications.

If any one else can shed some more light it might help all of us.


Expert Comment

ID: 10919813

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL handling single and double quotes 3 99
Programming Arduino to control a Max7219 using C 2 148
How to jump to matching brace in eclipse editor ? 1 354
Problem to save 10 174
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

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