Find all substrings which are repeated
I need to find all substring of length greater than 2 which are repeated. I can solve it using brute force .Is there any other optimal solution available?
eg . SpringisHereAgainSpringHere
Sample output : Spr,Spri,Spring,here,her