You are given a string s of length n, where s[i] is either 'I' representing an increase or 'D' representing a decrease.
A permutation perm of the integers in the range
If s[i] == 'I', then perm[i] < perm[i + 1]
If s[i] == 'D', then perm[i] > perm[i + 1]
Return the total number of valid permutations perm. Since the answer may be large, return it modulo
Constraints:
n == s.length
s[i] is either 'I' or 'D'
You are given a string s of length n, where s[i] is either 'I' representing an increase or 'D' representing a decrease.
A permutation perm of the integers in the range
If s[i] == 'I', then perm[i] < perm[i + 1]
If s[i] == 'D', then perm[i] > perm[i + 1]
Return the total number of valid permutations perm. Since the answer may be large, return it modulo
Constraints:
n == s.length
s[i] is either 'I' or 'D'