java - (Algorithm) find nodes having single path to reach from one node to other -


i wanted know fastest algorithm finding nodes have path 1 node other nodes. enter image description here

these nodes represented in string this:

string path = "({a,b,c,d,e,f},{(a,c),(b,c),(c,e),(b,e),(b,d),(e,f)})"; 

output should this:

output = {(a,c),(b,d),(e,f)} 

i tried split() method long procedure appreciate can give me in working problem

it seems me need to:

  1. find cycles in graph
  2. eliminate edges contribute cycle

Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -