> hi
>
> would anyone happen to have on hand right now a stinking post order
> traversal, of course written in ada..at least like the algorithm for it.
>
> thanx for any help
>
> Satrina
>
Hmmm - this looks like a homework problem, so I'm just sketching
something for you to follow up. Assuming "postorder traversal"
means traversing a binary tree in left-right-node order, the
(recursive) algorithm is nearly trivial:
Given a tree T (generally represented as a pointer to a node):
if T is not empty then
traverse T's left subtree
traverse T's right subtree
do something with the data at T
end if
Assuming you've developed a representation for the tree structure,
converting this to Ada will be REALLY simple.
Wasn;t this in your textbook?
Cheers -
Michael Feldman
------------------------------------------------------------------------
Michael B. Feldman - chair, SIGAda Education Working Group
Professor, Dept. of Electrical Engineering and Computer Science
The George Washington University - Washington, DC 20052 USA
202-994-5919 (voice) - 202-994-0227 (fax)
http://www.seas.gwu.edu/faculty/mfeldman
------------------------------------------------------------------------
"Cooperate with those who have both know-how and integrity."
Fortune cookie, Wu Dynasty, Bethesda, MD, Spring 1996.
------------------------------------------------------------------------
Ada on WWW: http://www.acm.org/sigada/education or http://www.adahome.com
------------------------------------------------------------------------