PDA

View Full Version : Algorithm



Culver
February 18th, 2010, 10:32 AM
Plz Send me the algo of tree traversal in post order

MadCow108
February 18th, 2010, 10:44 AM
wow your lazy...
how about thinking yourself, its not very hard.
or at least google yourself

but because I'm in a good mood here:
http://en.wikipedia.org/wiki/Tree_traversal#Sample_implementations

point_man
February 18th, 2010, 03:28 PM
wow your lazy...


LOL exactly my thoughts!

hj_ebfe
February 18th, 2010, 03:32 PM
Ditto, a quick google or bing search would solve your problem or better yet you could perhaps think and figure it out for yourself.

Simian Man
February 18th, 2010, 03:33 PM
Here you go:



1. Traverse the tree in post order.

ve4cib
February 18th, 2010, 03:51 PM
Here you go:



1. Traverse the tree in post order.


I like it. Elegant in its simplicity.

The bogo-post-traversal algorithm could also work for the OP:


1. Traverse the tree in a random order
2. If order != post-traversal order then goto 1

CptPicard
February 18th, 2010, 03:53 PM
http://plzsendmethecode.blogspot.com/2008/08/java-sms-deluge.html