in data structures, suffix trees are used in many problems. Which of the
complexity solution
1. Determining the shortest repeated substring
2. Determining the longest palindrome in a string
3. Determining the longest common substring
Answers
Answered by
1
Answer:
The B option is correct.
Explanation:
The B option is correct i.e. Suffix trees are used to determine the longest palindrome in a string.
Suffix tree is considered a compressed tree of entirely all of suffixes of a given string. Suffix trees aid in solving a lot of string associated problems like pattern matching, finding different sub-strings in a given string, finding longest palindrome etc.
Suffix tree is a compressed tree of all the suffixes of a given string, so the brute force method will be to consider all the suffixes of the given string as discrete strings and insert them in the tree one by one.
Similar questions