diagram for delete on a parent node
Took a break from code, came back to my binary tree. I did my get, and started the remove/delete and got a little stuck.
The parent node, which I consider the first branch from the root_node seems to be the biggest hurdle.
Took me a bit, but I came up with this diagram to show myself where I needed to go for the new parent node. I'll put the code up when I've written it. Here's my pic, with some logic written in.
The parent node, which I consider the first branch from the root_node seems to be the biggest hurdle.
Took me a bit, but I came up with this diagram to show myself where I needed to go for the new parent node. I'll put the code up when I've written it. Here's my pic, with some logic written in.
Comments
Post a Comment