I have an array in which in each row , all the vertices are connected. eg: 0 3 4 6 2 0 1 2 5 here there is a direct path in between each of the two nodes in each row if we take row1: 0 is connected with 3 , 4 and 3 is connected with 4 the graph is undimentional what I did is to convert it into a n*n matrix and applied Floyd–Warshall algorithm but as its efficieny is o(n^3).As solution set is large. Its taking long time. Can you suggest me a better solution. thank you
↧