β
Correct Answer: (A)
o(n + m)
Explanation: z algorithm is an efficient pattern searching algorithm as it searches the pattern in linear time. it has a time complexity of o(m + n) where m is the length of text and n is the length of the pattern.
Explanation by: Mr. Dubey
z algorithm is an efficient pattern searching algorithm as it searches the pattern in linear time. it has a time complexity of o(m + n) where m is the length of text and n is the length of the pattern.
Discussion
Question Analytics
328
Total Visits
3 y ago
Published
Mr. Dubey
Publisher
86%
Success Rate