how about finding all the connected-components and checking which allĀ have 3 edges?
________________________________ From: ankur aggarwal <[email protected]> To: "i...@mca_2007" <[email protected]>; [email protected]; [email protected] Sent: Sunday, 6 September, 2009 2:58:40 PM Subject: [algogeeks] find triangle in a graph google question : find triangle in a graph Given an undirected graph, design a O(V+E) algo to detect whether there is a triangle in the graph ot not. See the Web's breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz.yahoo.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---
