← 返回 amazon 的题目列表Pattern Matching with Permutation and Subsequence
类型:online_judge
amazon
Given two strings s1 and s2, find a substring in s2 such that this substring is a permutation or subsequence of s1. Return the minimum operation cost needed to achieve this. Operation cost is defined as the number of character transformations. Provide a solution with test cases, assuming the strings contain only lowercase letters.
Example
Input
abcd
bcdaac