Question: How to write this code in java Now you are going to design an algorithm to find the chain of the virus from one person
How to write this code in java
Now you are going to design an algorithm to find the chain of the virus from one person to the next, dentifying and isolating those people. For simplicity, let N be the number of citizens, each denoted by 0 , 1,2,,N1. Then each citizen writes down the citizen he/she comes in contact with. To avoid typing these numbers by hand, use the shuffling algorithm to generate a random sequence of 0,1,2,,N1 for testing. Be aware that all elements are distinct. For example, consider N=16 and start from the first citizen. A possible output is shown below
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
