I want the code for the algorithm preferably in C/C++.
Input - General tree and process (convert) to binary tree. Output - Leaf nodes of both the trees.