Question

I am in CSC 330 and we have a big project to create a 234 or 2-3-4 tree. I am currently working on my insert method. I have my while loop which moves through the tree but am stuck with a simple problem. When I am breaking up a 4-node how do I access the parent node, to give it my middle element? I have a 234 node that is an array that takes in an element, my element takes in an integer and a String. I understand that the best way to access a parent would be to make a method in my node class, but it baffles me on how to move backwards in a linked list.

Pas de solution correcte

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top