DSC-Banasthali-Vidyapith / Code-Crossroad

This project contains the carefully compiled Data Structures & Algorithm questions asked by the companies that visit Banasthali Vidyapith on-campus.
MIT License
55 stars 78 forks source link

Lowest Common Ancestor of a Binary Tree #131

Open Vanshikagarg17 opened 2 years ago

Vanshikagarg17 commented 2 years ago

Aim Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.

Details “The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has both p and q as descendants (where we allow a node to be a descendant of itself).”

lucy2512 commented 2 years ago

I would like to work on this in C++. Will you please assign it to me?

Ananyaas commented 2 years ago

@lucy2512 you can work on this issue. All the best!

SmritiOjha23 commented 2 years ago

I would like to work on this issue in Java. Please assign this to me @Ananyaas @Vanshikagarg17.