1. LCA in a Binary Search Tree.
2. LCA in a Binary Tree.
http://www.geeksforgeeks.org/lowest-common-ancestor-binary-tree-set-1/
http://articles.leetcode.com/lowest-common-ancestor-of-a-binary-tree-part-i
Parent PointerApproach:
http://www.geeksforgeeks.org/lowest-common-ancestor-in-a-binary-tree-set-2-using-parent-pointer/
http://articles.leetcode.com/lowest-common-ancestor-of-a-binary-tree-part-ii
RMQ Approach:
http://www.geeksforgeeks.org/find-lca-in-binary-tree-using-rmq/
3. Minimum Distance between two nodes in a BST/BT
http://www.geeksforgeeks.org/find-distance-two-given-nodes/
http://algorithms.tutorialhorizon.com/find-the-distance-between-two-nodes-of-a-binary-tree/
http://www.geeksforgeeks.org/lowest-common-ancestor-in-a-binary-search-tree/
http://articles.leetcode.com/lowest-common-ancestor-of-a-binary-search-tree/
2. LCA in a Binary Tree.
http://www.geeksforgeeks.org/lowest-common-ancestor-binary-tree-set-1/
http://articles.leetcode.com/lowest-common-ancestor-of-a-binary-tree-part-i
Parent PointerApproach:
http://www.geeksforgeeks.org/lowest-common-ancestor-in-a-binary-tree-set-2-using-parent-pointer/
http://articles.leetcode.com/lowest-common-ancestor-of-a-binary-tree-part-ii
RMQ Approach:
http://www.geeksforgeeks.org/find-lca-in-binary-tree-using-rmq/
3. Minimum Distance between two nodes in a BST/BT
http://www.geeksforgeeks.org/find-distance-two-given-nodes/
http://algorithms.tutorialhorizon.com/find-the-distance-between-two-nodes-of-a-binary-tree/
http://tech-queries.blogspot.com/2010/04/isomorphic-trees.html
ReplyDeletehttp://tech-queries.blogspot.com/2010/04/quasi-isomorphic-trees.html