Amazon | SDEII onsite | Patient Zero
Anonymous User
2975

Find Patient zero, given a list infectors and infectee
e.g.
Student 1 infects Student 2 i.e.
1->2
2->3
7->5
4->12
8->11
8->13
… etc
A student can only be infected by only one student but a single student can infect many students.
I believe this is a basic directed graph building question and output should be the head of the graph.

Comments (9)