File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
c-sharp/Problems/sliding-window Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 5
5
* You are given a string s and an integer k.
6
6
* You can choose any character of the string and change it to any other uppercase English character.
7
7
* You can perform this operation at most k times.
8
- *
8
+ *
9
9
* Return the length of the longest substring containing the same letter you can get after performing the above operations.
10
10
*
11
11
* Example 1:
12
12
* Input: s = "ABAB", k = 2
13
13
* Output: 4
14
14
* Explanation: Replace the two 'A's with two 'B's or vice versa.
15
- *
15
+ *
16
16
* Example 2:
17
17
* Input: s = "AABABBA", k = 1
18
18
* Output: 4
22
22
* There may exists other ways to achieve this answer too.
23
23
*
24
24
* Constraints:
25
- * • 1 <= s.length <= 105
25
+ * • 1 <= s.length <= 10^5
26
26
* • s consists of only uppercase English letters.
27
27
* • 0 <= k <= s.length
28
28
**
You can’t perform that action at this time.
0 commit comments