How to erase edge from adjacency list of an undirected graph in O(1) for eular tour?

Revision en1, by _Muhammad, 2019-07-19 16:57:34

Assalamualikum!

For finding eular cycle we need to erase edges from graph. But I don't know how to erase edges in O(1) for undirected graph. I can only erase edges in O(log(n)) using C++ set for adjacency list instead of vector.

But I need to erase edges in O(1) so that my eular cycle finding algorithm will run in O(N) instead of O(Nlog(N)). Please tell me how to do it.

Thanks In Advance.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English _Muhammad 2019-07-19 16:57:34 488 Initial revision (published)