Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2976. Minimum Cost to Convert String I
Given source and target strings and a set of weighted directed character transformations (possibly with multiple edges), find the minimum total cost to turn each source character into the corresponding target character by chaining allowed transforms, or return -1 if any position is unreachable. This reduces to computing shortest-path distances between letters (small fixed alphabet) and summing the per-position costs.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.