My friends and I are quite struggling with this task. In any other language this would be easy.
We tried converting the tree into a list, remove an element and then building a tree. The build from list to tree building part we have no clue how to do.
How would I go about it with this tree:
tree(1, [tree(6, [tree(7, [])] ),
tree(3, []),
tree(2, [tree(4, []),
tree(5, [])])
])
Would be immensely grateful for any nudges or solutions.