Rabin Karp algorithm and naive pattern searching algorithm have the same worst case time complexity.
True
False
5 practice sets · Page 1 of 1
Rabin Karp algorithm and naive pattern searching algorithm have the same worst case time complexity.
True
False
The naive pattern searching algorithm is an in place algorithm.
True
False
What is the auxiliary space complexity of Z algorithm for pattern searching (m = length of text, n = length of pattern)?
O(n + m)
O(m)
O(n)
O(m * n)
What is the time complexity of Z algorithm for pattern searching (m = length of text, n = length of pattern)?
O(n + m)
O(m)
O(n)
O(m * n)
What is the worst case time complexity of KMP algorithm for pattern searching (m = length of text, n = length of pattern)?
O(n)
O(n*m)
O(m)
O(log n)