Vidyalelo
Data Structure · Q70

Searching Algorithms

Programming · Data Structure · question 70

Q70

What is the time complexity of Z algorithm for pattern searching (m = length of text, n = length of pattern)?

A.
O(n)
B.
O(m)
C.
O(n + m)
Answer
D.
O(m * n)

Answer: Option C

Solution

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