Need help with this graph theory question — any ideas??

Revision en1, by m15s, 2021-12-06 12:02:38

A given graph represents friendship relations between a group of people. Each node is a person and an edge between any nodes means that the two people are friends. The problem wants us to find a group of 3 or more people such that every member of the group is friends with atleast two other members in the same group. In the case that there are multiple such groups satisfying this, they want us to return any one. In case that there is no such group satisfying the condition, we can return an empty list.

Any ideas for this? I was thinking of working with connected components but i'm not too sure on how to build on that. Please do help me out!! thanks

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English m15s 2021-12-06 12:02:38 717 Initial revision (published)