Vidyalelo
Data Structure · Q4

String Matching

Programming · Data Structure · question 4

Q4

In which scenario does the Naive string matching algorithm perform well?

A.
When using a large alphabet.
B.
When there are many potential matches.
C.
When both the pattern and text are very short.
Answer
D.
When the pattern is long and the text is large.

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board