Hello everyone,
I'm trying to recreate the C# dictionary class using binary trees for chaining. I have my binary tree class complete, and all I really need now is to connect my array with numerous instances of the binary tree class.
basically my program works like this:
-enter in a key value pair. The key value pair is stored in an array.
-If the location [key] in the array is occupied by a previous insertion, a new binary tree instance is created and the key value pair is stored there.
So if a collision calls for it, each slot in the array can have its own binary tree.
My problem is, is that I need binary tree instances to be created and named as they are required.
I'm not that experienced with C# or programming in general. The only way I could do this is create a binary tree instance for each array slot manually and give it a unique name. However, since the array's size isn't static that would not work for very long.
I hope this is semi-clear at least. Thanks for an help.