Binary Tree Solution Replacement

Please explain again about root->data .

Hey @vanshikasharma1645 can you tell me at what time stamp you didn’t understand the logic so that i can help you with that.
Also if you would mention what exactly get you confused while understanding this problem.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.