Question DSA-STR-0040
EasyIn the worst case, how long does naive (brute-force) pattern matching take for a text of length n and a pattern of length m?
- A.
O(m)
- B.
O(n·m)
- C.
O(log n)
- D.
O(n + m)
Sign up free to see the answer and a step-by-step explanation.