Math
2147. Number of Ways to Divide a Long Corridor
A corridor of 'S' (seat) and 'P' (plant). Divide it into sections with dividers so each section has exactly 2 seats. Count the ways, mod 1e9+7 (0 if impossible). The divider between consecutive…
Loading…