[LeetCode] 903. Valid Permutations for DI Sequence DI序列的有效排列
WearegivenS,alengthnstringofcharactersfromtheset{'D','I'}.(Theselettersstandfor"decreasing"and"increasing".)AvalidpermutationisapermutationP[0],P[1],...,P[n]ofintegers{0,1,...,n},suchthatforalli:IfS[i