Consider the following string: KOTMAALE, and pattern to be matched: AALE. By how many positions will the first shift be performed, using the bad character and good prefix rules?

a. 4
b. 3
c. 2
d. 1

a. 4
The bad character will be found at the 3rd position (M in text won't match E in pattern); because there is no match with the suffix, we will shift by the entire pattern length (4) positions.

Computer Science & Information Technology

You might also like to view...

Opening a table in Datasheet View enables:

A) entering a description of a field. B) choosing the data type of each field. C) entering data into a field. D) adding and editing fields.

Computer Science & Information Technology

After you narrow to several vendor finalists, it is useful to have each present. What are the kinds of things you need to be sure to ask each about to help you select which you will work with?

What will be an ideal response?

Computer Science & Information Technology