A

Admin • 831.35K Points
Coach

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)

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.