I am looking for some algorithm, which could identify repeating patterns in an input array of strings.
Considering the following input strings: