leetle

Daily challenge for 2025-02-09

40. Zigzag Conversion

Write a function solve that reads a string in a zigzag pattern on a given number of rows, then returns the row-by-row read string. If 'zigzag pattern' is unclear, see the relevant question.

Example:
Input: "PAYPALISHIRING", 3
Output: "PAHNAPLSIIGYIR"

Run this challenge interactively in Python or JavaScript when the app loads.