Re: Red Black Guaruntees



"jehugaleahsa@xxxxxxxxx" wrote:

.... snip ...

I meant, is it possible to do a in-order traversal without a parent
pointer. With the parent pointer, one can go from a right-most child
and work their way *up* to the next-in-order node.

Of course it is. For example:

void inorder(node *root) {

if (root) {
inorder(node->left);
process(node->data);
inorder(node->right);
}
}

which doesn't alter the tree in any way.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>



--
Posted via a free Usenet account from http://www.teranews.com

.