Thomson Reuters interview question

Iterate through array and identify possible patterns.