I know this was a kmp question, but haven't reviewed that in forever, so I had to make do with writing out the n^2 solution.
The interviewer made me feel horrible, by remaining silent most of the time, and giving very little hints or guidance. This is by far the worst phone screen experience I ever had. In the end I got so frustrated I told him I will just end this early.
The thing that really threw me off was, this was done in coderpad, but they disabled code execution, and wanted me to talk about my "thinking process", because that was what they were looking for. I am sorry, but what is the point of using coderpad, if you aren't running the code at all? Also, "thinking process" is a very ambiguous thing to score someone on, especially if the interviewer hardly guides the conversation, and the interviewee is made to feel they are talking to a disembodied voice.