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

Правка en1, от _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.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский _Muhammad 2019-07-19 16:57:34 488 Initial revision (published)