NeetCode #29LC-1055MediumArrays & HashingNC Algo100
← Back to All Problems

#29 · #1055 · Shortest Way to Form String(形成字符串的最短路径)

📌 Problem Statement & Constraints

Given a string source and a string target, return the minimum number of subsequences of source whose concatenation equals target. If it is impossible, return -1. Constraints: 1 <= source.length, target.length <= 1000.
🔒

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!