Maximum Length Substring With Two Occurrences - Practice Coding | SlaveCode
Problems
Scratchpad
Run
Submit
0
0
1
2
3
4
5
6
7
8
9
0
0
1
2
3
4
5
6
7
8
9
:
0
0
1
2
3
4
5
6
7
8
9
0
0
1
2
3
4
5
6
7
8
9
Toggle theme (Current: Custom)
Scratchpad
Run
Submit
Description
Hints
Solutions
3090. Maximum Length Substring With Two Occurrences
Easy
10 Points
Hash Table
String
Sliding Window
Examples
Example 1
Input: s = "bcbbbcba" Output: 4 Explanation:
Example 2
Input: s = "aaaa" Output: 2 Explanation:
Constraints
2 <= s.length <= 100
s consists only of lowercase English letters.
JAVASCRIPT
Code
Tests
Result
Description
Hints
Solutions
3090. Maximum Length Substring With Two Occurrences
Easy
10 Points
Hash Table
String
Sliding Window
Examples
Example 1
Input: s = "bcbbbcba" Output: 4 Explanation:
Example 2
Input: s = "aaaa" Output: 2 Explanation:
Constraints
2 <= s.length <= 100
s consists only of lowercase English letters.
JAVASCRIPT
Code
Tests
Result