Блог пользователя NO..ONE..CARES

Автор NO..ONE..CARES, история, 8 лет назад, По-английски

For find out second best spanning tree is needed to first build mst tree and for each edge from mst tree flag them then again run kruskal. But how to find second best spanning tree only using union find data structure or lca. I want to know both ways :( Thanks in advance :)

  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Is there yet any answer to that by using only DSU? LCA answers are widely known and appear everywhere, but I have seen nowhere anything using the DSU generated by Kruskal (without path compression of course, since path compression destroys the useful information)...

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

check this submission 15317414 DSU only