Algorithm that finds the first common ancestor is implemented