[zigzagConverter] O(n), more concise, AC~