ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
What is the auxiliary space complexity of Z algorithm for pattern searching (m = length of text, n = length of pattern)?
Correct Answer: B — O(m)
Z algorithm is an efficient pattern searching algorithm as it searches the pattern in linear time. It an auxiliary space of O(m) for maintaining Z array.