Sure, but you still have to make some arbitrary decisions that define the strategy for making one tree out of two. It's harder when the data structure doesn't make that decision for you by its definition. Write that function and then your delete is practically finished.
On Saturday, May 10, 2014, Michal Kawalec <michal@bazzle.me> wrote:
On 10.05.2014 16:27, Bob Ippolito wrote:
> In order to implement delete you need to have some sort of merge
> operation for the cases where the node being deleted has more than one
> child. In this case your tree data structure doesn't appear to be a
> search tree or balanced in any way so it's much harder to generally
> decide how delete should work.
But this is a binary (albeit unbalanced, which changes nothing) tree :)
Michal