avinash201199 / avinash201199/DSA-Questions

Lowest Common Ancestor of Binary Tree

Open
#353 3 comments 0 reactions 2 assignees Claimed by @esheetaparulekar View on GitHub
hacktoberfest
Dominant language
C++
Stars
88
Forks
167
PR merge metrics
No merged PRs in 30d

Description

Hi, I m participating in hacktoberfest '21. I want to add a solution to a problem which goes as: -
Question:
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.

Example:
Input: root = [3,5,1,6,2,0,8,null,null,7,4], p = 5, q = 1
Output: 3
Explanation: The LCA of nodes 5 and 1 is 3.

So please kindly assign this to me for hacktoberfest '21

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.