Ok. WOW!
I was way off. I adapted your code to my BST and it works
perfectly.
Thanks!
I didn't know what static if was. I should experiment with it.
For the code that I mentioned, I'd have to retype it. I wrote,
tried and deleted those pieces of code several days ago because
it really didn't work.
On Friday, 9 June 2017 at 15:12:04 UTC, ag0aep6g wrote:
...
Note that this is only supposed to show how to do the special
casing for classes. addNode probably doesn't do exactly what
it's supposed to do in your tree.
I'm not sure what you mean by this?
I'm fairly certain that all inserted nodes (not duplicates) are
in fact in the tree. Also, Although I deleted the method, I did
check my size variable by traversing the tree and counting the
actual number of nodes.
They matched exactly for each unit test.
??