You are given a string corridor of length n representing a corridor layout, where each character is either 'S' representing a seat or 'P' representing a plant.
You want to install dividers to divide the corridor into adjacent sections such that each section contains exactly
Return the number of ways to divide the corridor. Since the answer may be large, return it modulo
Constraints:
n == corridor.length
corridor[i] is either 'S' or 'P'.
You are given a string corridor of length n representing a corridor layout, where each character is either 'S' representing a seat or 'P' representing a plant.
You want to install dividers to divide the corridor into adjacent sections such that each section contains exactly
Return the number of ways to divide the corridor. Since the answer may be large, return it modulo
Constraints:
n == corridor.length
corridor[i] is either 'S' or 'P'.