Run DFS on the graph and get the connected components. All of those must be made complete graphs.
On Tue, Nov 24, 2009 at 12:37 AM, Rohit Saraf <rohit.kumar.sa...@gmail.com>wrote: > Input - Edges. > Data Struct. - You decide ! > Output - Transitive Closure in adjacency matrix. > order - O(n^2) . > > (Transitive closure => If 2 points i and j are connected (though not > directly) in the graph, then they are directly connected in the > closure.) > > Any nice solution? (I solved using basic DP , but i think there must > exist a better solution) > > -- > > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.