ServiceNow 2023-April | Simulation Optimization & HashMaps | On-campus
ServiceNow · Question · Posted Jun 2026
Question 1: Virus Expansion Problem Statement There are N islands in a line, and each island has a virus on it. You will be given an array A of size N, where A[i] denotes the type of virus on the i-th island. These viruses can spread to neighbouring islands each day. i.e., the virus on the i-th island will spread to the (i-1)-th and (i+1)-th island in a single day. There exist chances such that the same type of virus ...
The full answer & interview discussion are available to premium members.
Log in Create a free account