Search
⌘K

Leetcode 6. Zigzag Conversion

Arrange the characters of a string into a zigzag pattern across numRows and then read the rows sequentially to produce the converted string. The core challenge is grouping characters into the correct rows following a repeating cycle (period = 2*numRows-2) efficiently, with the edge case numRows=1.

Asked at:

Amazon

Amazon

Oracle


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late March, 2026

Amazon

Amazon

Senior

Early November, 2025

Oracle

Senior

https://leetcode.com/problems/zigzag-conversion/description/

Your account is free and you can post anonymously if you choose.