Can any one give me an algorithm to remove repeated edges between the same nodes except 1 and self loops from multigraph to form an undirected graph in O(V + E)

Thanks