Construct Smallest Number From DI String
Given a pattern string of 'I' (increasing) and 'D' (decreasing), construct the smallest number of length n+1 using digits 1 to n+1 where each digit is used exactly once.
Given a pattern string of 'I' (increasing) and 'D' (decreasing), construct the smallest number of length n+1 using digits 1 to n+1 where each digit is used exactly once.