3474. Lexicographically Smallest Generated String

php dev.to

3474. Lexicographically Smallest Generated String Difficulty: Hard Topics: Principal, String, Greedy, String Matching, Weekly Contest 439 You are given two strings, str1 and str2, of lengths n and m, respectively. A string word of length n + m - 1 is defined to be generated by str1 and str2 if it satisfies the following conditions for each index 0 : If str1[i] == 'T', the substring1 of word with size m starting at index i is equal to str2, i.e., word[i..(i + m - 1)] == str2. If str1[i] ==

Read Full Tutorial open_in_new
arrow_back Back to Tutorials