NeetCode #641LC-2976MediumAdvanced Graphs
← Back to All Problems#641 · #2976 · Minimum Cost to Convert String I(转换字符串的最小成本 I)
📌 Problem Statement & Constraints
You are given
source, target, and parallel arrays original, changed, cost describing conversions between lowercase letters. Return the minimum cost to convert source into target, or -1. Constraints: 1 <= source.length <= 10^5, 0 <= original.length <= 2000, 1 <= cost[i] <= 10^6.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!