Search
⌘K

Leetcode 484. Find Permutation

Given a string of 'I' and 'D' of length n-1 that specifies whether each adjacent pair in a permutation of 1..n should be increasing or decreasing, construct the lexicographically smallest permutation that satisfies those relational constraints.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.