+1 vote
in Data Structures & Algorithms I by (88.2k points)
What is a time complexity for finding the longest palindromic substring in a string by using the generalized suffix tree?

(a) Linear Time

(b) Exponential Time

(c) Logarithmic Time

(d) Cubic Time

The above asked question is from Suffix tree in section Trie of Data Structures & Algorithms I

I got this question in an online interview.

1 Answer

+1 vote
by (672k points)
selected by
 
Best answer
Right option is (a) Linear Time

The explanation is: Palindrome is a string that is same when reading forward as well as backward. The time complexity for finding the longest palindromic substring in a string by using generalized suffix tree is linear time.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...