Applications of Suffix Array