You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: leetcode/2401-2500/2414.Length-of-the-Longest-Alphabetical-Continuous-Substring/README.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,28 @@
1
1
# [2414.Length of the Longest Alphabetical Continuous Substring][title]
2
2
3
-
> [!WARNING|style:flat]
4
-
> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm)
5
-
6
3
## Description
4
+
An **alphabetical continuous string** is a string consisting of consecutive letters in the alphabet. In other words, it is any substring of the string `"abcdefghijklmnopqrstuvwxyz"`.
5
+
6
+
- For example, `"abc"` is an alphabetical continuous string, while `"acb"` and `"za"` are not.
7
+
8
+
Given a string `s` consisting of lowercase letters only, return the length of the **longest** alphabetical continuous substring.
7
9
8
10
**Example 1:**
9
11
10
12
```
11
-
Input: a = "11", b = "1"
12
-
Output: "100"
13
+
Input: s = "abacaba"
14
+
Output: 2
15
+
Explanation: There are 4 distinct continuous substrings: "a", "b", "c" and "ab".
16
+
"ab" is the longest continuous substring.
13
17
```
14
18
15
-
## 题意
16
-
> ...
19
+
**Example 2:**
17
20
18
-
## 题解
19
-
20
-
### 思路1
21
-
> ...
22
-
Length of the Longest Alphabetical Continuous Substring
23
-
```go
24
21
```
25
-
22
+
Input: s = "abcde"
23
+
Output: 5
24
+
Explanation: "abcde" is the longest continuous substring.
0 commit comments