Checks to see if the pattern matches the sentence. In other words,checks to see that all the words in the pattern are in the sentence in the same order as the pattern. If the pattern matches then this, method returns the phrases before, between and after the pattern words. If the pattern does not match then null is returned.
Can someone help me to figure out the best algorithm for this assignment? This is creating a new method in Java.