in reply to Re: help! red-black binary tree problem
in thread help! red-black binary tree problem
If I'm dealing with the case that both $node and $curr point to the same RBNode (see code in previous post). The strange thing that happens is that the deleted node's children's parent pointers end up pointing to undef, even though $curr's parent's left and right pointers point to the proper nodes. I find this baffling. Any ideas as to how to fix the problem?
The catch with my RedBlack binary tree implementation is that I can't capture any return balue. Any ideas as to how to fix my code w/o having to capture any return value? The code works perfectly fine when $node and $curr point to distinct nodes. Thanks.
|
|---|