πŸ“Š Design and Analysis of Algorithms
Q. What is the auxiliary space complexity of Z algorithm for pattern searching (m = length of text, n = length of pattern)?
  • (A) o(n + m)
  • (B) o(m)
  • (C) o(n)
  • (D) o(m * n)
πŸ’¬ Discuss
βœ… Correct Answer: (B) o(m)

Explanation: 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.


Explanation by: Mr. Dubey
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.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
723
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
96%
Success Rate