Skip to content

Tag: binary-tree

Method to delete certain level of binary tree

I have class SimpleTree just basic binary tree: And the problem is to write method: Where level is the level of the elements in some tree (root level == 0). For example level == 1: Only LEFT leaf of DELETED elements is saved, if we dont have such -> save the right. Answer Your tree seems to be a recursive