Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Zigzag Conversion

Write a string in a zigzag pattern on a given number of rows, then read it line by line and print the result.

Constraints

1 <= len(s) <= 1000 1 <= numRows <= 1000

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.