class Node {
private int value;
public Node (int i) {value=i;}
Node Left;
Node Right;
Node Parent;
}
class BinaryTree {
private Node root;
public Tree { root = new Node());
//other
}
Assuming the two class are wrote right; I'm looking a way two write an Iterator on the tree (ie an iterator that go down on the nodes of the Tree). Is there a way? How to write it?
thank you.
Iterator on a Tree
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
1 short reply
Marco59 pointsPosted Nov 19, 2007, 4:56 PM EST