Work in HR? Unlock Free Profile

Microsoft Software Development Engineer Interview Question

"Implement in C# the most optimum way of finding the closest common ancestor of a binary search tree."
Tags: technical, analytical, algorithm
Add Tags [?]

Part of a Software Development Engineer Interview Review - one of 3,366 Microsoft Interview Reviews

Answers & Comments

of 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

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

Tags are like keywords that help categorize interview questions that have something in common.