Tap here to switch tabs
Problem
Submissions

Problem: Last Substring in Lexicographical Order

med
30 min
Try to solve the Last Substring in Lexicographical Order problem.

Statement

Given a string s, return the substring of s that is the largest in lexicographical order.

Constraints:

  • 1≤1 \le s.length ≤4imes105\le 4 imes 10^5

  • s contains only lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Last Substring in Lexicographical Order

med
30 min
Try to solve the Last Substring in Lexicographical Order problem.

Statement

Given a string s, return the substring of s that is the largest in lexicographical order.

Constraints:

  • 1≤1 \le s.length ≤4imes105\le 4 imes 10^5

  • s contains only lowercase English letters.