Context: In class, we used the following applet to search for one string within another. http://www.cse.iitk.ac.in/users/dsrkg/cs210/applets/strMatching/naiveMatching/naive.html We then followed the steps of computational thinking to * Define the problem goal We described the inputs and the expected output, articulating their relationship. We also gave examples to refine this description, especially to ensure it wasn't ambiguous. * Define the algorithm We interactively created an algorithm. Note: The following is the state of the algorithm at the end of class on Wednesday, Feb 1. We are not quite done with this algorithm. --------------------------------------------------------------------------- Given two strings, a "text" and a "pattern", return a boolean indicating whether or not the pattern string matches exactly against part of the text string. search("Can he help you?","help") should return True search("Help!","help") should return False search("The lp that I was listen to...","help") should return False search("These are the dog's whelps.","help") should return True search(text,pattern) Given two strings, a "text" and a "pattern", return a boolean indicating whether or not the pattern string matches exactly against part of the text string. For each position i in the text string, If compareAtPositionI(text,pattern,i) return True return False compareAtPositionI(text,pattern,i) Compare pattern against text starting at position i and return a boolean indicating whether or not there was a match. For each position j in the pattern, If pattern[j] != text[i+j] return False return True