Problem
1. Construct an example for which the right-to-left pattern scan with only the mismatch heuristic performs badly.
2. How would you modify the Rabin-Karp algorithm to search for a given pattern with the additional proviso that the middle character is a "wild card" (any text character at all can match it)?
3. Implement a version of the Rabin-Karp algorithm to search for patterns in two-. dimensional text. Assume both pattern and text are rectangles of characters.