I wonder if anyone knows the (optimal?) algorithm for longest recurring non-overlapping sub string.
For example, in the string
ABADZEDGBADEZ
the longest recurring would be "BAD". Incidentally if there is no such result, the algorithm should alert that such a thing has occurred. My guess is that this involves suffix trees.
I'm sure this must exist somewhere already. Thanks for the help!
Suffix array is a good data structure for solving that problem.
There is a solution to this problem in Programming Pearls by Jon Bentley.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With