blob: f6a7e76208ac1a5afca15e37945d927e74f4f353 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
This problem was recently asked by Microsoft:
> Given a string, find the length of the longest substring without repeating characters.
Here is an example solution in Python language.
```python
class Solution:
def lengthOfLongestSubstring(self, s):
# Fill this in.
print Solution().lengthOfLongestSubstring('abrkaabcdefghijjxxx')
# 10
```
Can you find a solution in linear time?
|