0003. Longest Substring Without Repeating Characters
Medium | String + Two Pointer | 36 ms (99.77%), 13.7 MB (73.48%)
Last updated
Was this helpful?
Medium | String + Two Pointer | 36 ms (99.77%), 13.7 MB (73.48%)
Last updated
Was this helpful?
Source: GitHub:
Given a string s
, find the length of the longest substring without repeating characters.
Instead of checking each possible substring in the input string:
Regarding the repeating characters, we could use the hash table (dict or set in Python) to record each character in the current sliding window.