Hi can someone share the approach to find lexicographically largest substring in a string?
I know the answer will always be one of the suffixes but cannot find a way to analyze those suffixes efficiently.
Constraints |S| < 1e5
I need an O(n) approach or O(nlogn) without suffix array.
Any ideas are welcome.
I found this link on Leetcode but cannot understand it.