StackOverflow Questions for Tag: least-common-ancestor

Sidhartha Mohapatra
Sidhartha Mohapatra

Reputation: 41

lowest common ancestor (LCA) of two given nodes; getting null for one set of values; getting correct answer for another set

Score: 0

Views: 182

Answers: 1

Read More
user14955967
user14955967

Reputation:

How does "if right and left: return root" and the "return right or left" help us find the least common ancestor?

Score: 0

Views: 573

Answers: 1

Read More
Andro Star
Andro Star

Reputation: 11

Getting Wrong ancestor for the right side of the tree

Score: 1

Views: 48

Answers: 0

Read More
Abhishek Jaiswal
Abhishek Jaiswal

Reputation: 308

How to define LCA(Least Common Ancestor)(of two nodes) in case of a graph?

Score: 1

Views: 452

Answers: 1

Read More
Yuval Levy
Yuval Levy

Reputation: 2516

Least common ancestor search in binary tree non recursive version - Java

Score: 1

Views: 1098

Answers: 1

Read More
Siddhant
Siddhant

Reputation: 2525

How to find the lowest common ancestor of two nodes in any binary tree?

Score: 189

Views: 190504

Answers: 34

Read More
yper
yper

Reputation: 41

Least common ancestor of multiple nodes in DAG

Score: 4

Views: 4053

Answers: 2

Read More
zuccy
zuccy

Reputation: 29

find most visited node in a graph

Score: 2

Views: 1368

Answers: 1

Read More
zoran2
zoran2

Reputation: 1

Is this LCA algorithm ok, used elsewhere?

Score: 0

Views: 46

Answers: 0

Read More
MACS
MACS

Reputation: 173

How do criss-cross merges arise in Git?

Score: 10

Views: 6513

Answers: 4

Read More
Node.JS
Node.JS

Reputation: 1570

Why is this implicit cast is not possible?

Score: 4

Views: 161

Answers: 2

Read More
Shane Hsu
Shane Hsu

Reputation: 8357

Range Minimum Query <O(n), O(1)> approach (from tree to restricted RMQ)

Score: 11

Views: 9891

Answers: 1

Read More
Glaze
Glaze

Reputation: 11

Splitting a Directed Acyclic Graph (DAG) into components, then finding root and last child in those components

Score: 1

Views: 2867

Answers: 1

Read More
Nicolas Holthaus
Nicolas Holthaus

Reputation: 8273

Determine least common ancestor at compile-time

Score: 20

Views: 776

Answers: 3

Read More
ciechowoj
ciechowoj

Reputation: 924

Find multiple LCAs in unrooted tree

Score: 6

Views: 2981

Answers: 2

Read More
Patrick Collins
Patrick Collins

Reputation: 10574

What's wrong with this least common ancestor algorithm?

Score: 2

Views: 872

Answers: 2

Read More
thoughtful me
thoughtful me

Reputation: 115

Unclear understanding on Lowest Common Ancestor(LCA) Algorithm

Score: 0

Views: 140

Answers: 0

Read More
drop27
drop27

Reputation: 143

How to represent a non binary tree and how to do LCA on that tree?

Score: 7

Views: 6893

Answers: 1

Read More
Meitar
Meitar

Reputation: 145

Finding least Common ancestor in Binary Tree with o(h^2) for a change

Score: 1

Views: 67

Answers: 1

Read More
Adam Atanas
Adam Atanas

Reputation: 19

Most efficient algorithm to check if leaf c is in the same subtree as leaves a and b

Score: 1

Views: 137

Answers: 1

Read More
PreviousPage 1Next