integrated team the looking-glass heuristic sets up the other heuristic to allow us to avoid comparisons between and whole groups of characters in in this case at leastwe can get to the destination faster by going backwardsfor if we encounter mismatch during the consideration of at certain location in tthen we are likely to avoid lots of needless comparisons by significantly shifting relative to using the character-jump heuristic the character-jump heuristic pays off big if it can be applied early in the testing of potential placement of against let us therefore get down to the business of defining how the character-jump heuristics can be integrated into string pattern matching algorithm to implement this heuristicwe define function last(cthat takes character from the alphabet and characterizes how far we may shift the pattern if character equal to is found in the text that does not match the pattern in particularwe define last(cas if is in plast(cis the index of the last (right-mostoccurrence of in otherwisewe conventionally define last( if characters can be used as indices in arraysthen the last function can be easily implemented as look-up table we leave the method for computing this table in ( +| |timegiven pas simple exercise ( - this last function will give us all the information we need to perform the character-jump heuristic in code fragment we show the bm pattern matching algorithm code fragment matching algorithm the boyer-moore pattern