Tap here to switch tabs
Problem
Submissions

Problem: Length of the Longest Alphabetical Continuous Substring

med
30 min
Try to solve the Length of the Longest Alphabetical Continuous Substring problem.

Statement

An alphabetical continuous substring is a substring consisting of consecutive letters of the English alphabet appearing in alphabetical order. For example, "abc" is alphabetical continuous, whereas "acb" and "za" are not.

Given a string s consisting of lowercase English letters, return the length of the longest alphabetical continuous substring.

Constraints:

  • 1≤1 \leq s.length ≤105\leq 10^5

  • s consists of only English lowercase letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Length of the Longest Alphabetical Continuous Substring

med
30 min
Try to solve the Length of the Longest Alphabetical Continuous Substring problem.

Statement

An alphabetical continuous substring is a substring consisting of consecutive letters of the English alphabet appearing in alphabetical order. For example, "abc" is alphabetical continuous, whereas "acb" and "za" are not.

Given a string s consisting of lowercase English letters, return the length of the longest alphabetical continuous substring.

Constraints:

  • 1≤1 \leq s.length ≤105\leq 10^5

  • s consists of only English lowercase letters.