Available question text
Given a target string and two operations—append the next character at cost addCost or copy any substring that already appears in the built prefix at fixed cost copyCost—compute the minimum cost to construct the whole string. This is solved by dynamic programming combined with substring-matching (e.g., KMP or rolling hash) to determine the maximal copyable segment from each position.
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
No company association
Leetcode 3253. Construct String with Minimum Cost (Easy)
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source