Write a method and the corresponding recursive function to


Problem

1. Write a method and the corresponding recursive function to traverse a binary tree (in whatever order you find convenient) and dispose of all its nodes. Use destructor this method to implement a Binary_tree destructor.

2. Write a copy constructor

Binary_tree::Binary_tree(const Binary_tree&original)

that will make a copy of a linked binary tree. The constructor should obtain constructor the necessary new nodes from the system and copy the data from the nodes of the old tree to the new one.

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a method and the corresponding recursive function to
Reference No:- TGS02645562

Expected delivery within 24 Hours