Lowest common ancestor

code : https://ide.codingblocks.com/s/231342

can anyone tell me the error?

@chaman9 I think you are saying about that print output.
You have printed the node *, so it is printing its address.
do this -> cout<<findLCA(root, 10, 13)->data<<endl;

yeaah i did it thankyou

@chaman9 Also please remember to mark this doubt as resolved

i already did that sanyam

1 Like