# Suffix Tree Multiple choice Questions and Answers (MCQs)

## Suffix Tree Multiple choice Questions and Answers (MCQs)

 Question 1
What is a time complexity for x pattern occurrence of length n?
 A O (log n!) B Ɵ (n!) C O (n2) D Ɵ (n + x)
Question 1 Explanation:
Suffix tree is also known as PAT tree or position tree. It allows fast string operation. To check if a substring is present in a string of a length of n, the time complexity for such operation is found to be O (n). The time complexity for x pattern occurrence of length n is Ɵ (n + x).

 Question 2
What is a time complexity for finding the longest substring that is common in string S1 and S2?
 A O (log n!) B Ɵ (n!) C O (n2+ n1) D Ɵ (n1 + n2)
Question 2 Explanation:
Suffix Tree allows fast string operation. To check if a substring is present in a string of a length of n, the time complexity for such operation is found to be O (n). The time complexity for finding the longest substring that is common in string S1 and S2 is Ɵ (n1 + n2).

 Question 3
What is a time complexity for finding the longest substring that is repeated in a string?
 A O (log n!) B Ɵ (n!) C O (n2+ n1) D Ɵ (n)
Question 3 Explanation:
Suffix Tree allows fast string operation. To check if a substring is present in a string of a length of n, the time complexity for such operation is found to be O (n). The time complexity for finding the longest substring that is repeated in a string is Ɵ (n).

 Question 4
What is a time complexity for finding frequently occurring of a substring of minimum length in a string?
 A Ɵ (n) B Ɵ (n!) C O (n2+ n1) D O (log n!)