Skip to content

Commit 5d12d36

Browse files
authored
Update 3._Longest_Substring_Without_Repeating_Characters.md
1 parent 4148b35 commit 5d12d36

File tree

1 file changed

+35
-6
lines changed

1 file changed

+35
-6
lines changed

docs/Leetcode_Solutions/Java/3._Longest_Substring_Without_Repeating_Characters.md

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,40 @@
1+
# 3. Longest Substring Without Repeating Characters
12

2-
### 3. Longest Substring Without Repeating Characters
3+
**<font color=red>难度: Medium</font>**
34

4-
题目:
5-
https://leetcode.com/problems/longest-substring-without-repeating-characters/
5+
## 刷题内容
66

7-
难度:
8-
Medium
7+
> 原题连接
8+
9+
* https://leetcode.com/problems/longest-substring-without-repeating-characters/description/
10+
11+
> 内容描述
12+
13+
```
14+
Given a string, find the length of the longest substring without repeating characters.
15+
16+
Example 1:
17+
18+
Input: "abcabcbb"
19+
Output: 3
20+
Explanation: The answer is "abc", with the length of 3.
21+
Example 2:
22+
23+
Input: "bbbbb"
24+
Output: 1
25+
Explanation: The answer is "b", with the length of 1.
26+
Example 3:
27+
28+
Input: "pwwkew"
29+
Output: 3
30+
Explanation: The answer is "wke", with the length of 3.
31+
Note that the answer must be a substring, "pwke" is a subsequence and not a substring.
32+
```
33+
34+
## 解题方案
35+
36+
> 思路 1
37+
******- 时间复杂度: O(N)******- 空间复杂度: O(1)******
938

1039
```java
1140
class Solution {
@@ -20,4 +49,4 @@ class Solution {
2049
return maxLen;
2150
}
2251
}
23-
```java
52+
```

0 commit comments

Comments
 (0)