private static void RunTests(BinarySearchTree tree) { // one of the node is not in the tree int first = 10; int second = 14; Node result = tree.FindNearestCommonParent(tree.Root, first, second); PrintResult(result); // both nodes in the tree first = 10; second = 15; result = tree.FindNearestCommonParent(tree.Root, first, second); PrintResult(result); // both nodes in the tree first = 15; second = 7; result = tree.FindNearestCommonParent(tree.Root, first, second); PrintResult(result); // both nodes in the tree first = 25; second = 3; result = tree.FindNearestCommonParent(tree.Root, first, second); PrintResult(result); // both nodes in the tree first = 25; second = 15; result = tree.FindNearestCommonParent(tree.Root, first, second); PrintResult(result); }