What is a Suffix Array and how does it differ from a Suffix Tree?
A Suffix Array is a sorted array of all suffixes of a string, represented as their starting indices. It is simpler and more space-efficient than a Suffix Tree.
Thatâ€™s correct. A Suffix Array is a compact representation compared to a Suffix Tree, but it lacks direct support for substring queries.
Can you discuss how you would use a Suffix Array for pattern matching and the potential drawbacks compared to a Suffix Tree?