Get Patch Sequence
Problem Overview
- Find the sequence of patch uses to build the target words from lowercase letters.
- Input: patch (string) and designerWords (string). Output: N space-separated integers, or -1 if impossible.
- If multiple valid sequences exist, return the smallest permutation.
- Context: a clothing company assembling designs from recycled patches.
- A coding interview problem and practical interview question on string construction.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
