Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring that does not contain any repeating characters.

Constraints

  • 0 <= s.length <= 5 * 10^4
  • s consists of English letters, digits, symbols and spaces.
Auto-saved · 3 lines
class Solution:
def lengthOfLongestSubstring(self, s: str) -> int:

Console

Click Run to execute sample tests.