Remove the leaves

what exactly do we have to do in this question.I’m not able to understand the sample output

12 => 50 <= END
END => 12 <= END

in sample output you have to print nodes along with their left and right nodes also
if anyone one of them is NULL then print “END”

order of printing will be first node itself then left subtree and then right subtree

you can take help from this code

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.