initExercise()
The exercise below will test your newly acquired knowledge on the KMP algorithm. Assume the two characters highlighted in red were just compared and it is discovered they don't match. Please click the index of the master string that will be compared after the current mismatch and then the index of the substring that will be compared to it. When you are finished hit Check Answer to see if you are correct. The values in the strings that have already been compared are highlighted in green so there is no confusion. In effect what you are doing is tracing the string sub_str through the string master_str using the KMP Algorithm for just one step.
[started]
if (!checkAnswer(main_text, search_string, sub_str) && !guess[0]) return ""; else return checkAnswer(main_text, search_string, sub_str);