← Questions

Build a target string from the fewest substrings of a source

0
DatabricksCodingLast asked May 2026

Express a target string as a concatenation of substrings of a source string, each given by its index range, using as few pieces as possible. Follow-up: after one character of the source is deleted, find the new minimum.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding