Amazon Interview Question

find the common ancestor of two nodes using the interface.