Interview Question

Software Development Engineer Interview

Implement in C# the most optimum way of finding the closest

  common ancestor of a binary search tree.
Tags:
technical, analytical, algorithm
Answer

Interview Answer

1 Answer

0

This would be O(2^d) where d is the depth of the BST.
You would simply need a recursive function and hashset to do that.

anonymous on Nov 20, 2013

Add Answers or Comments

To comment on this question, Sign In with Facebook or Sign Up