Available question text
Given words and a target, find the minimum number of segments needed to partition target so each segment is a prefix of some word in words (return -1 if impossible). This is a string-segmentation / shortest-path DP problem that requires efficient prefix matching (e.g., trie or prefix lookup) to handle large target and word lengths.
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 3292. Minimum Number of Valid Strings to Form Target II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source