A rotation on a string is defined as removing first element and concatenating it at the end.
Given N and an array of N strings.
Your job is to predict the minimum no. of rotations on the strings so as to make all the strings equal.
If this is not possible return -1