implemented the longest repeated substring algorithm