Current Forum: 15-211 Main Forum |
Date: Mon Dec 17 2001 9:48 pm |
Author: White, David <white3@andrew.cmu.edu> |
Subject: Re: Tree Positions question on Fall 00 Test |
|
|
I think the question states that: "Assume you can store preorder and postorder numbers in the Node objects". So that means given node n1 and node n2, it is trivial you can do something like n1.pre to get the preoder number and something like n1.post to get the post.
If there wasn't an object, you could do something like the array thing you mentioned... |
|