Given a string s, return the longest prefix that is repeated somewhere else in the string. For example, "arglebargle" would return "argle" as "argle" starts at the beginning of the string and is repeated again later.

Complete the following file:

prog.cpp

#include <iostream> #include <string> using namespace std; string longestPrefixRepeated(string s) {
}