Search⌘ K
AI Features

Lowest Common Ancestor of a Binary Tree III

Lowest Common Ancestor of a Binary Tree III gives two nodes with parent references but no root; return the lowest node that is an ancestor of both in the binary tree.

Statement

You are given two nodes, p and q. The task is to return their lowest ...