filmov
tv
ZigZag Conversion LeetCode | Solution | Python 3

Показать описание
This video shows the solution to one of the medim level problem statement of LeetCode.
Problem Statement :
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).
P A H N
A P L S I I G
Y I R
And then read line by line: "PAHNAPLSIIGYIR"
eg:
Input: s = "PAYPALISHIRING", numRows = 3
Output: "PAHNAPLSIIGYIR"
Problem Statement :
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).
P A H N
A P L S I I G
Y I R
And then read line by line: "PAHNAPLSIIGYIR"
eg:
Input: s = "PAYPALISHIRING", numRows = 3
Output: "PAHNAPLSIIGYIR"