Company: Oracle_23sep
Difficulty: medium
Infection Sequences Problem Description In a town with n houses aligned in a straight line, numbered from 1 to n from left to right, a virus is spreading from m initially infected houses. Each day, an infected house spreads the virus to its immediate uninfected neighbors. Specifically, if house number X is infected on day I, then houses X+1 and X-1 will become infected on day I+1 if they are not already infected. Eventually, all houses will become infected. The sequence in which the houses get infected is called the infection sequence. Given an integer n and an integer array infectedHouses representing the initially infected houses, determine the total number of distinct infection sequences possible, modulo (10 9 + 7). Complete the function getInfectionSequencesCount in the editor with the following parameters: int n : the number of houses int infectedHouses[m] : the currently infected houses Returns: int : the number of infection sequences modulo (10 9 + 7) Examples Example 1: Input: