✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
A circular linked list (where the last node points back to the first node) is used to represent a group of people sitting around a table. However, some random people at the table are found to be infected. If they are infected, they will infect the people sitting directly next to them after 1 hour.
void infection_propagation(struct Node *Header)
Write a C function infection_propagation that will take the address of the first node of a circular linked list as input argument, where each node in the linked list of type struct Node and represents a person seated at the table. The data member within the node is equal to 1 if the respective person is infected and 0 otherwise. Your function must propagate the infection around the table by calculating the number of infected people at each hour, and stop when all people at the table are infected.struct Node {
int data;
struct Node *next;
}
Note:Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!