Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
Zigzag Conversion
Bookmark
Input
Standard (3 rows)
4 Rows
Small
Single Row
Custom
s
=
PAYPALISHIRING
,
numRows
=
3
s
P
A
Y
P
A
L
I
S
H
I
R
I
N
G
0
1
2
result
algo
master
.
io
Step:
Start: write "PAYPALISHIRING" in a zigzag over 3 rows, then read row by row
0 / 35
Input
Standard (3 rows)
4 Rows
Small
Single Row
Custom
s
=
PAYPALISHIRING
,
numRows
=
3
0 / 35
s
P
A
Y
P
A
L
I
S
H
I
R
I
N
G
0
1
2
result
algo
master
.
io
Step:
Start: write "PAYPALISHIRING" in a zigzag over 3 rows, then read row by row