Question: How can I use Boyer-Moore algorithm to match a string pattern in a 2-dimension array? For example the input is cbcdefghij kemnopqrst uvexyzrich abcgefghij klmngpqrst
How can I use Boyer-Moore algorithm to match a string pattern in a 2-dimension array?
For example
the input is
cbcdefghij
kemnopqrst
uvexyzrich
abcgefghij
klmngpqrst
The algorithm would be able to search for the word "chegg" in the array. It could be right to left, left to right or diagonally.
Thanks :)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
