Do interviewers expect students to know the KMP algorithm and solve it with that?


#1

Do interviewers expect students to know the KMP algorithm and solve it with that?


#2

Yes! You should start with the brute force approach and then either solve the question with KMP or some other.