S&P Global Interview Question

Find the nearest common parent to two given nodes in a tree.