Regarding vivek and birthday celebration

for the test case
5 3
1 2
2 3
4 5
why is the answer 1…shouldn’t it be 2 because we have to send less invitations but invite as many friends as possible

@hv439606Question says that…call minimum friends.Print the minimal number - minimum number of friends Vivek can invite
Make a graph of dependency.
There will be multiple comonents in your graph.
Select the graph with minimum component.