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.
Just figured this out myself and wrote some code for this (written in C#) with a lot of comments. Hope this helps someone:
// Check whether the string contains a repeating sequence.
public static bool ContainsRepeatingSequence(string str)
{
if (string.IsNullOrEmpty(str)) return false;
for (int i=0; i
Feel free to ask any questions if it's unclear why it works.