Given a string of no more than 255 characters, find a function that returns the longest recurring substring. An example would be:
where the longest recurring sub-string is aabba. I would preffer the answer in C/C++ as they are the only languages I know. The algorithm should be as fast as possible.