Finding the largest repeating substring
I guess a prefix tree might help. 


Build a parallel array of pointers (sorry for a C-speak) into an original text.
Sort it. 
Scan it for a longest match in two consecutive entries.


Overall complexity is \$O(ns)\$

Where \$n\$ is the length of the text and \$s\$ is the length of the longest recurring substring.