Remotasks interview question

To write program to find longest repeated sequence