Skip to content

Commit b5d7741

Browse files
committed
Create README - LeetHub
1 parent eaaa751 commit b5d7741

File tree

1 file changed

+28
-0
lines changed
  • 0395-longest-substring-with-at-least-k-repeating-characters

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<h2><a href="https://leetcode.com/problems/longest-substring-with-at-least-k-repeating-characters/">395. Longest Substring with At Least K Repeating Characters</a></h2><h3>Medium</h3><hr><div><p>Given a string <code>s</code> and an integer <code>k</code>, return <em>the length of the longest substring of</em> <code>s</code> <em>such that the frequency of each character in this substring is greater than or equal to</em> <code>k</code>.</p>
2+
3+
<p data-pm-slice="1 1 []">if no such substring exists, return 0.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong class="example">Example 1:</strong></p>
7+
8+
<pre><strong>Input:</strong> s = "aaabb", k = 3
9+
<strong>Output:</strong> 3
10+
<strong>Explanation:</strong> The longest substring is "aaa", as 'a' is repeated 3 times.
11+
</pre>
12+
13+
<p><strong class="example">Example 2:</strong></p>
14+
15+
<pre><strong>Input:</strong> s = "ababbc", k = 2
16+
<strong>Output:</strong> 5
17+
<strong>Explanation:</strong> The longest substring is "ababb", as 'a' is repeated 2 times and 'b' is repeated 3 times.
18+
</pre>
19+
20+
<p>&nbsp;</p>
21+
<p><strong>Constraints:</strong></p>
22+
23+
<ul>
24+
<li><code>1 &lt;= s.length &lt;= 10<sup>4</sup></code></li>
25+
<li><code>s</code> consists of only lowercase English letters.</li>
26+
<li><code>1 &lt;= k &lt;= 10<sup>5</sup></code></li>
27+
</ul>
28+
</div>

0 commit comments

Comments
 (0)