Re: Red Black Guaruntees
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Wed, 31 Oct 2007 01:07:02 -0500
"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
.
- References:
- Red Black Guaruntees
- From: jehugaleahsa@xxxxxxxxx
- Re: Red Black Guaruntees
- From: Ben Pfaff
- Re: Red Black Guaruntees
- From: jehugaleahsa@xxxxxxxxx
- Red Black Guaruntees
- Prev by Date: Re: Why localize structures in this case.
- Next by Date: Re: SortMerge avoids thrashing (was: Bailey's "two pass" FFT algorithm question)
- Previous by thread: Re: Red Black Guaruntees
- Next by thread: Re: Red Black Guaruntees
- Index(es):