I believe my solution to be O(M * N) because it only passes through the string the number of rows there are:

```
public String convert(String s, int numRows) {
String answer = "";
int universal = (numRows-1)*2;
int stepSize = universal;
int altStepSize = universal;
for (int i = 0; i < numRows; i++) {
if (i == 0 || i == numRows-1) {
stepSize = universal;
altStepSize = universal;
} else {
stepSize -= 2;
altStepSize = universal - stepSize;
}
int counter = 0;
for (int j = i; j < s.length();) {
answer += s.charAt(j);
if ((counter % 2) == 0) j += stepSize;
else j += altStepSize;
counter++;
}
}
return answer;
}
```