Problem: Longest Substring Without Repeating Characters
Find the length of the longest substring without repeating characters.
Given a string, find the length of the longest substring that contains no repeating characters.
Constraints
- 0 <= s.length <= 5 * 10^4
- s consists of English letters, digits, symbols and spaces
Example
Input: s = "abcabcbb"
Output: 3 (substring "abc")
Input: s = "bbbbb"
Output: 1 (substring "b")
Complexity
- Time: O(n)
- Space: O(min(m, n)) where m is charset size
Contribution Guidelines
- Implement in one language (we'll add others later)
- Include README with problem statement and test cases
- Add test harness in your implementation
- Follow code style guide in .gemini/styleguide.md
Problem: Longest Substring Without Repeating Characters
Find the length of the longest substring without repeating characters.
Given a string, find the length of the longest substring that contains no repeating characters.
Constraints
Example
Input: s = "abcabcbb"
Output: 3 (substring "abc")
Input: s = "bbbbb"
Output: 1 (substring "b")
Complexity
Contribution Guidelines