develooper Front page | | Postings from August 2002

Re: tpr04c started

Thread Previous | Thread Next
August 5, 2002 03:55
Re: tpr04c started
Message ID:
In article <>,
	Jasper McCrea <> writes:
> just as a matter of interest, i was wondering if anyone is as stupid as i
> am. i had to read through the rules for postorder about 10 times, and
> then dig out a pen and paper and work out the meaning. took me ages
> (well, 15 minutes, probably). i kept reading "write down the top node,
> then the left node in preorder, then the right node in preorder",

left *subtree* in preorder of course.

> thinking, that's all very well, but how do i write down the left and
> right nodes in preorder when i don't know what it means?
> i think i have it figured out now, though.

To understand recursion, we must first understand recursion...

(though I should have mentioned the endcase "do nothing for an empty tree"
in my definition. As it stands it's just as recursive as the maxim quoted

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About