Finding articulation points and biconnected components in a graph