Tap here to switch tabs
Problem
Submissions

Problem: Find K-Length Substrings With No Repeated Characters

med
30 min
Try to solve the Find K-Length Substrings With No Repeated Characters problem.

Statement

Given a string s and an integer k, return the number of substrings of s of length k that contain only unique characters.

Constraints:

  • 1≤1 \leq s.length ≤104\leq 10^4

  • s consists of lowercase English letters.

  • 1≤1 \leq k ≤104\leq 10^4

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Find K-Length Substrings With No Repeated Characters

med
30 min
Try to solve the Find K-Length Substrings With No Repeated Characters problem.

Statement

Given a string s and an integer k, return the number of substrings of s of length k that contain only unique characters.

Constraints:

  • 1≤1 \leq s.length ≤104\leq 10^4

  • s consists of lowercase English letters.

  • 1≤1 \leq k ≤104\leq 10^4