Skip to main content

Command Palette

Search for a command to run...

Zigzag Conversion

Published
โ€ข1 min readโ€ขView as Markdown

๐Ÿง  Problem

The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) And then read line by line: "PAHNAPLSIIGYIR" Write the code that will take a string and make this conversion given a number of rows:


๐Ÿท๏ธ Tags

String


๐Ÿ“Š Difficulty

Medium

โœ… Success Rate: 41.4%
๐Ÿ“ฅ Submissions: 1,804,469
๐Ÿ“ˆ Accepted: 747,158


โค๏ธ Reactions

๐Ÿ‘ Likes: 3570
๐Ÿ‘Ž Dislikes: 8234


๐Ÿ’ก Hints


๐Ÿ” Similar Questions

1 views

More from this blog

ReStart LeetCode

540 posts