added common ancestor problem test case