1100. Find K-Length Substrings With No Repeated Characters
Hash TableStringSliding Window
Hints
Hint 1
How to check efficiently each K-length substring?
Hint 2
First store the first leftmost K-length substring in a hashTable or array of frequencies.
Hint 3
Then iterate through the rest of characters and erase the first element and add the next element from the right. If in the hashTable we have K different character we add 1 to the counter. After that return as answer the counter.
Preparing judge…