Write s in a zigzag across numRows rows, then read row by row. Two approaches — simulate the bounce, or compute each row's indices with the period formula.
numRows