Question DSA-STR-0050
MediumWhat is the time complexity of the naive pattern search for a pattern of length m in a text of length n?
- A.
O(n)
- B.
O(log n)
- C.
O((n − m + 1) × m)
- D.
O(n + m)
Sign up free to see the answer and a step-by-step explanation.