Lowest Common Ancestor

Can you send code to these problems?
I’m not understanding this problem.

@faizan_1402