What is the time required to locate the occurrences of a pattern P of length m in a string of length n using suffix array?

Q & ACategory: Data StructureWhat is the time required to locate the occurrences of a pattern P of length m in a string of length n using suffix array?
Admin Staff asked 4 years ago

What is the time required to locate the occurrences of a pattern P of length m in a string of length n using suffix array?
a) O(nm)
b) O(n2)
c) O(mnlogn)
d) O(mlogn)

1 Answers
Admin Staff answered 4 years ago

d) O(mlogn)