Search
⌘K

Leetcode 1055. Shortest Way to Form String

Given a source and target string, return the minimum number of subsequences of source that need to be concatenated to form target (or -1 if any target character doesn't appear in source). The core challenge is to cover the target by repeatedly taking ordered subsequences from source and minimizing the number of passes.


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.