[LeetCode] Find Permutation

1 · · Feb. 19, 2022, 11:14 a.m.
484. Find Permutation A permutation perm of n integers of all the integers in the range [1, n] can be represented as a string s of length n - 1 where: s[i] == ‘I’ if perm[i] < perm[i + 1], and s[i] == ‘D’ if perm[i] > perm[i + 1]. Given a string s, reconstruct the lexicographically smallest permutation perm and return it. ...