My problem is to find the repeating sequence of characters in the given array. simply, to identify the pattern in which the characters are appearing.
Tongue-in-cheek O(NlogN) solution
Perform an FFT on your string (treating characters as numeric values). Every peak in the resulting graph corresponds to a substring periodicity.