Leetcode 3297. Count Substrings That Can Be Rearranged to Contain a String I
Count the substrings of word1 whose character counts dominate the counts of word2 (i.e., the substring can be rearranged so word2 appears as its prefix). This is essentially a frequency-vector comparison over all substrings of length >= |word2|, solvable with sliding-window/prefix-count techniques on lowercase letters.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.