O: Edges to vertices conversion was inefficient.