Interview Question

Software Development Engineer Interview

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

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

Interview Answer

1 Answer


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, Sign In or Sign Up.