String
3474. Lexicographically Smallest Generated String
Given str1 (of 'T'/'F', length n) and str2 (length m). Find the lexicographically smallest word of length n+m−1 such that for each i: if str1[i]=='T', the substring word[i..i+m−1] equals str2; if…
Loading…