Amazon interview question

Explain abstraction and polymorphism? Given a binary search tree and a node, find the nearest node in the binary tree to the given node ? How will you optimize it ? Write the code.