POV-Ray : Newsgroups : povray.text.scene-files : "bst.inc" A Binary Search Tree : Re: "bst.inc" A Binary Search Tree Server Time
19 Jul 2024 23:28:02 EDT (-0400)
  Re: "bst.inc" A Binary Search Tree  
From: ingo
Date: 4 Jul 2024 01:30:00
Message: <web.66863235d85acfd417bac71e8ffb8ce3@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:

Thanks.

I already had quite some problems with deleting a node in this one.

When deleting I first followed some Python et al. examples, but these high level
and OOP languages obfuscate what really has to be done. Copy data to a node and
then search won't work as you have the same value twice. So copy, delete, paste.
That took some time to figure out where it went wrong.

One thing that didn't work was keeping count of the amount of entries,
especially after deleting a value. So now I just search for an empty one when
inserting.

It is and will stay a slow moving project,

ingo


> cool.  had a v similar project on the go, and "faltered" when it came to RB tree
> deletion of nodes; could not get the parser "to agree" on the code variations I
> tried :-).  bon chance.
>
>
> regards, jr.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.