You are given a pattern of length 'I' meaning increasing and 'D' meaning decreasing.
Create a string num of length
num consists of the digits
If pattern[i] is equal to 'I', then num[i] < num[i + 1].
If pattern[i] is equal to 'D', then num[i] > num[i + 1].
Return the lexicographically smallest possible string num that meets these conditions.
Constraints:
pattern.length
pattern consists of only the letters 'I' and 'D'.
You are given a pattern of length 'I' meaning increasing and 'D' meaning decreasing.
Create a string num of length
num consists of the digits
If pattern[i] is equal to 'I', then num[i] < num[i + 1].
If pattern[i] is equal to 'D', then num[i] > num[i + 1].
Return the lexicographically smallest possible string num that meets these conditions.
Constraints:
pattern.length
pattern consists of only the letters 'I' and 'D'.