Examveda

What is the primary advantage of the Boyer-Moore algorithm compared to the Naive Search algorithm?

A. It always performs well regardless of pattern length.

B. It works well for very short patterns.

C. It skips large portions of the text, making it faster for large datasets.

D. It uses less memory.

Answer: Option C


This Question Belongs to Data Structure >> String Matching

Join The Discussion

Related Questions on String Matching