hiphoplover's blog

By hiphoplover, history, 10 years ago, In English

We are given a graph of n nodes and m edges. Also given some value for each node.

For each node (i = 1 to N) , we have to remove all the edges associated with node i , and we have to return number of pairs of nodes that have same value but are on different component! PS — I know it can be solved by block cut tree. Can u please give me any other method or the name of algo which can be used to solve this problem!

Full text and comments »

  • Vote: I like it
  • -11
  • Vote: I do not like it

By hiphoplover, history, 10 years ago, In English

We are given a graph of n nodes and m edges. Also given some value for each node.

For each node (i = 1 to N) , we have to remove all the edges associated with node i , and we have to return number of pairs of nodes that have same value but are on different component!

PS — I know it can be solved by block cut tree.

Can u please give me any other method or the name of algo which can be used to solve this problem!

Full text and comments »

  • Vote: I like it
  • -21
  • Vote: I do not like it