View Single Post
Old 02-13-2004, 05:37 AM   #2 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,175
Belisarius is on a distinguished road
Sorry for the slow reply, haven't been on in a while.

While I don't fully understand the assignment, I assume this is for an intro programming class.

How does your teacher want you to use a queue? If you have a tree, writing a toString() methods makes more sense, if all you need to do is display the thing.

If this is anything like the assignment I had to write a b-tree, the queue would be more appropriately called a "cache", the queue holding part of the tree allowing for quicker reference to commonly accessed elements.

But that's making a possibly invalid assumption in regards to what your teacher meant by "use a queue".
__________________
GitS
Belisarius is offline   Reply With Quote