Build the lexicographically smallest string with a subsequence.
Unlock detailed company stats for this questionUpgrade
Given a target subsequence like 324 and integers x and y, repeatedly append the unit digit of x or y to build the lexicographically smallest string that contains the subsequence.
Community answers
No answers contributed by the community yet.
Related questions
Lexicographically smallest string after swaps.Construct the lexicographically smallest signed permutation with a given sum.Given a string, choose a substring once and rotate it right by one position, and return the lexicographically smallest string possible.Related courses

Course

Course
Course
