# Suffix Array Multiple choice Questions and Answers (MCQs)

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

 Question 1
Which of the following is false?
 A Suffix array is always sorted B Suffix array is used in string matching problems C Suffix array is always unsorted D Suffix array contains all the suffixes of the given string
Question 1 Explanation:
Suffix array is always sorted as it contains all the suffixes of a string in sorted order. Suffix arrays are used to solve problems related to string, like string matching problems.

 Question 2
Suffix array of the string "statistics" is .....
 A 2 8 7 4 9 0 5 1 6 3 B 2 7 4 9 8 0 5 1 6 3 C 2 4 9 0 5 7 8 1 6 3 D 2 8 7 0 5 1 6 9 4 3
Question 2 Explanation:
The suffix array of the string statistics will be:

2 atistics

8 cs

7 ics

4 istics

9 s

0 statistics

5 stics

1 tatistics

6 tics

3 tistics

In Suffix array, we only store the indices of suffixes. So, correct option is 2 8 7 4 9 0 5 1 6 3.

 Question 3
Suffix array can be created by performing ..... traversal of a suffix tree.
 A breadth-first B level order C depth-first D either breadth-first or level order
Question 3 Explanation:
A suffix tree is a trie, which contains all the suffixes of the given string as their keys and positions in the string as their values. So, we can construct a suffix array by performing the depth-first traversal of a suffix tree.

 Question 4
Suffix array is space efficient and faster than the suffix tree.
 A True B Fasle