Tap here to switch tabs
Problem
Submissions

Problem: Longest Substring with At Least K Repeating Characters

med
30 min
Try to solve the Longest Substring with At Least K Repeating Characters problem.

Statement

Given a string s and an integer k, return the length of the longest substring of s such that the frequency of every character in that substring is at least k. If no such substring exists, return 00.

Constraints:

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

  • s consists of only lowercase English letters.

  • 1≤1 \leq k ≤105\leq 10^5

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Longest Substring with At Least K Repeating Characters

med
30 min
Try to solve the Longest Substring with At Least K Repeating Characters problem.

Statement

Given a string s and an integer k, return the length of the longest substring of s such that the frequency of every character in that substring is at least k. If no such substring exists, return 00.

Constraints:

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

  • s consists of only lowercase English letters.

  • 1≤1 \leq k ≤105\leq 10^5