Re: doing things with binary trees
- From: Franken Sense <frank@xxxxxxxxxxxxxxx>
- Date: Sat, 25 Apr 2009 21:56:11 -0700
In Dread Ink, the Grave Hand of Andrew Tomazos Did Inscribe:
On Apr 26, 1:07 am, Franken Sense <fr...@xxxxxxxxxxxxxxx> wrote:
I've been shaking the bugs out of this program, that would read lines of
text using a binary tree.
The first thing I'd like to do with this tree is print it. I have code for
it here, and it works almost flawlessly. It does, however, print the root
node last. How do I fix it:
I can't reproduce the problem. I ran it on the following test file:
1
2
4
3
3
5
2
The output of the program was:
-- 1
1
-- 1
2
-- 2
3
-- 2
4
-- 1
5
-- 1
Which looks correct to me?
-Andrew.
All of them.
--
Frank
Oh, What Doesn't Kill You Can Have Lingering Aftereffects!
~~ Al Franken,
.
- Follow-Ups:
- Re: doing things with binary trees
- From: Andrew Tomazos
- Re: doing things with binary trees
- References:
- doing things with binary trees
- From: Franken Sense
- Re: doing things with binary trees
- From: Andrew Tomazos
- doing things with binary trees
- Prev by Date: Re: Copy-on-Write memory management
- Next by Date: Re: Any way to protect code from decompilers?
- Previous by thread: Re: doing things with binary trees
- Next by thread: Re: doing things with binary trees
- Index(es):
Relevant Pages
|