Available question text
Given source and target strings and a list of allowed substring → substring replacement rules with costs, compute the minimum total cost to transform source into target by applying any number of operations where each operation uses a listed rule and operations must be either on disjoint intervals or exactly the same interval (i.e., no partial overlaps). Return -1 if the transformation is impossible.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Microsoft
Leetcode 2977. Minimum Cost to Convert String II
Reported Feb 26, 2026 · 1 source report
SENIOR
Source snapshot: Nov 12, 2026
View source