algorithm to find cut vertex - Search