Tap here to switch tabs
Problem
Submissions

Problem: Count Substrings With K-Frequency Characters I

med
30 min
Try to solve the Count Substrings With K-Frequency Characters I problem.

Statement

Given a string s and an integer k, return the total number of substrings of s where at least one character appears at least k times.

A substring is a contiguous non empty sequence of characters within a string.

Constraints:

  • 1≤1 \leq s.length ≤3000\leq 3000

  • 1≤1 \leq k ≤\leq s.length

  • s consists only of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Substrings With K-Frequency Characters I

med
30 min
Try to solve the Count Substrings With K-Frequency Characters I problem.

Statement

Given a string s and an integer k, return the total number of substrings of s where at least one character appears at least k times.

A substring is a contiguous non empty sequence of characters within a string.

Constraints:

  • 1≤1 \leq s.length ≤3000\leq 3000

  • 1≤1 \leq k ≤\leq s.length

  • s consists only of lowercase English letters.