You are browsing the archive for 2011 July.

Lowest Common Ancestor of a Binary Tree Part II

July 21, 2011 in binary tree

Given a binary tree, find the lowest common ancestor of two given nodes in the tree. Each node contains a parent pointer which links to its parent.

Read the rest of this entry →

Lowest Common Ancestor of a Binary Tree Part I

July 18, 2011 in binary tree

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

Read the rest of this entry →

Lowest Common Ancestor of a Binary Search Tree (BST)

July 17, 2011 in binary tree

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

Read the rest of this entry →