bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
HardTwo PointersLC 1163

Last Substring in Lexicographical Order

Given a string s, return the last substring of s in lexicographical order.

Asked at 4 companies
Goldman SachsMathworksRoblox
Hints
  • 1.Think about which data structure fits best
  • 2.Consider the time complexity of your approach
  • 3.Look for patterns in the constraints
LeetCode