Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > In search of a good example.

Reply
Thread Tools

In search of a good example.

 
 
codefixer@gmail.com
Guest
Posts: n/a
 
      03-10-2005
Hi,

I am supposed to recommend a project using Binary Tress. I don't want
to use the same old school examples. I am wondering if anyone of you
can think of a real world example which uses Binary Tress. Need to be a
complex one.

Thanks

 
Reply With Quote
 
 
 
 
Thomas Matthews
Guest
Posts: n/a
 
      03-10-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> Hi,
>
> I am supposed to recommend a project using Binary Tress. I don't want
> to use the same old school examples. I am wondering if anyone of you
> can think of a real world example which uses Binary Tress. Need to be a
> complex one.
>
> Thanks
>


Database index file / table.
Given a key field of a record, locate the record as quickly
as possible. One could use a "Binary Tress" to associate
the key with the position of a record.

I don't know if this is a school example or not.

Hmm, is a binary truss the same as a binary tress?

--
Thomas Matthews
 
Reply With Quote
 
 
 
 
Andrew Koenig
Guest
Posts: n/a
 
      03-10-2005
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...

> I am supposed to recommend a project using Binary Tress.


How about the animal game?

Here's how it works: The machine asks you to think of an animal, and then
starts asking you yes/no questions about it. Eventually, it makes a guess
as to what the animal is, and you tell it whether it's right.

If it's wrong, it asks you: What question would you ask to distinguish your
animal from <whatever its guess was>?

You ask it a question, and tell it whether the answer should be yes or no.
After that, it will incorporate your question into the list of questions
that it asks next time.

It should be clear that the data structure to use for this game is a binary
tree, with a new leaf added each time there's a new animal.


 
Reply With Quote
 
Marcin Kalicinski
Guest
Posts: n/a
 
      03-11-2005
> I am supposed to recommend a project using Binary Tress. I don't want
> to use the same old school examples. I am wondering if anyone of you
> can think of a real world example which uses Binary Tress. Need to be a
> complex one.



An implementation of std::map?

cheers,
Marcin


 
Reply With Quote
 
DHOLLINGSWORTH2
Guest
Posts: n/a
 
      03-11-2005

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Hi,
>
> I am supposed to recommend a project using Binary Tress. I don't want
> to use the same old school examples. I am wondering if anyone of you
> can think of a real world example which uses Binary Tress. Need to be a
> complex one.
>
> Thanks


A compression tree is pretty complex, but the tree starts balanced and ends
up pretty lopsided.

It only takes a small while to code, but longer to think out.

Dan


 
Reply With Quote
 
Alan Brown
Guest
Posts: n/a
 
      03-11-2005
(E-Mail Removed) wrote in
news:(E-Mail Removed) ups.com:

> Hi,
>
> I am supposed to recommend a project using Binary Tress. I don't want
> to use the same old school examples. I am wondering if anyone of you
> can think of a real world example which uses Binary Tress. Need to be a
> complex one.
>
> Thanks
>


How about counting the words in a text.

Each word occupies a tree node with a counter. The counter is incremented
for each repetition of the word.

At the end an alphabetic list of words and counters is printed.

Maybe this is too simple

Alan


 
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
Good Website Search Engines Besides Google Search ... Chris K. HTML 3 06-08-2008 05:46 AM
removing search engines from the search bar whatever.or.not@gmail.com Firefox 1 02-17-2005 12:06 PM
Search Bar not displaying search Engines Zimran Douglas Firefox 1 01-07-2005 02:30 PM
search within a search within a search - looking for better way...my script times out Abby Lee ASP General 5 08-02-2004 04:01 PM



Advertisments