Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Binary search tree and Dictionary

Reply
Thread Tools

Binary search tree and Dictionary

 
 
bear220720@gmail.com
Guest
Posts: n/a
 
      05-20-2005
I have a big problem about how to make this C++ program.
I was asked to use binary search tree to built a dictionary.
This program must have some function,
1. Read a article file and include every word of it into the
dictionary.
2. When enter a word, it can make a search and report the word where
the search eventually stops.
If anyone has this kind of program, please send to me.
Thank you!

 
Reply With Quote
 
 
 
 
Karl Heinz Buchegger
Guest
Posts: n/a
 
      05-20-2005
wrote:
>
> I have a big problem about how to make this C++ program.
> I was asked to use binary search tree to built a dictionary.
> This program must have some function,
> 1. Read a article file and include every word of it into the
> dictionary.
> 2. When enter a word, it can make a search and report the word where
> the search eventually stops.
> If anyone has this kind of program, please send to me.
> Thank you!


Show your attempt for this homework question and tell us what your
specific problem is. Then somebody will try to help you with
that specific problem.
But nobody is going to write this program for you from scratch.

--
Karl Heinz Buchegger

 
Reply With Quote
 
 
 
 
Rolf Magnus
Guest
Posts: n/a
 
      05-20-2005
Karl Heinz Buchegger wrote:

> wrote:
>>
>> I have a big problem about how to make this C++ program.
>> I was asked to use binary search tree to built a dictionary.
>> This program must have some function,
>> 1. Read a article file and include every word of it into the
>> dictionary.
>> 2. When enter a word, it can make a search and report the word where
>> the search eventually stops.
>> If anyone has this kind of program, please send to me.
>> Thank you!

>
> Show your attempt for this homework question and tell us what your
> specific problem is. Then somebody will try to help you with
> that specific problem.
> But nobody is going to write this program for you from scratch.


I will - for 250 Euros.

 
Reply With Quote
 
Chris Theis
Guest
Posts: n/a
 
      05-20-2005

"Rolf Magnus" <> wrote in message
news:d6kj42$fcq$05$...
> Karl Heinz Buchegger wrote:
>
>> wrote:
>>>
>>> I have a big problem about how to make this C++ program.
>>> I was asked to use binary search tree to built a dictionary.
>>> This program must have some function,
>>> 1. Read a article file and include every word of it into the
>>> dictionary.
>>> 2. When enter a word, it can make a search and report the word where
>>> the search eventually stops.
>>> If anyone has this kind of program, please send to me.
>>> Thank you!

>>
>> Show your attempt for this homework question and tell us what your
>> specific problem is. Then somebody will try to help you with
>> that specific problem.
>> But nobody is going to write this program for you from scratch.

>
> I will - for 250 Euros.


Oh damn, if I had known that a long time ago

Chris


 
Reply With Quote
 
Thomas Matthews
Guest
Posts: n/a
 
      05-20-2005
wrote:
> I have a big problem about how to make this C++ program.
> I was asked to use binary search tree to built a dictionary.
> This program must have some function,
> 1. Read a article file and include every word of it into the
> dictionary.
> 2. When enter a word, it can make a search and report the word where
> the search eventually stops.
> If anyone has this kind of program, please send to me.
> Thank you!
>

1. Read a line from the file.
2. Extact a word from that line.
3. Add word to the container (list, vector, map, etc.)
4. Repeat at step 2.
5. Display contents of container.
6. After the above works, expand program to read until
the end of the file is reached.

I would use the std::set container.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
 
Reply With Quote
 
red floyd
Guest
Posts: n/a
 
      05-20-2005
Thomas Matthews wrote:
> wrote:
>
>>I have a big problem about how to make this C++ program.
>>I was asked to use binary search tree to built a dictionary.
>>This program must have some function,
>> 1. Read a article file and include every word of it into the
>>dictionary.
>> 2. When enter a word, it can make a search and report the word where
>>the search eventually stops.
>>If anyone has this kind of program, please send to me.
>>Thank you!
>>

>
> 1. Read a line from the file.
> 2. Extact a word from that line.
> 3. Add word to the container (list, vector, map, etc.)
> 4. Repeat at step 2.
> 5. Display contents of container.
> 6. After the above works, expand program to read until
> the end of the file is reached.
>
> I would use the std::set container.
>


Of course, that will get him an F on his homework assignment, since he's
probably supposed to roll his own BST.
 
Reply With Quote
 
Simon
Guest
Posts: n/a
 
      05-20-2005
Hello,

You can check out www.eassignment.net for help with your assignments.
They are really helpful.

Simon Tanner

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Binary tree search vs Binary search Bogdan C Programming 22 10-21-2010 09:46 PM
Hi, I want to implement a General Tree Data structure (Not Binary Tree ) which have more than 2 sub nodes? sharan C Programming 2 10-31-2007 02:58 AM
Hi, I want to implement a General Tree Data structure (Not Binary Tree ) which have more than 2 sub nodes? sharan C Programming 4 10-30-2007 08:21 PM
Binary Search Tree Dictionary ADT Gaz Java 2 01-28-2006 10:22 PM
B tree, B+ tree and B* tree Stub C Programming 3 11-12-2003 01:51 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57