LeetCode 1-Z字形打印字符串
将一个给定字符串 s 根据给定的行数 numRows ,以从上往下、从左到右进行 Z 字形排列。输入:s = “PAYPALISHIRING”, numRows = 3。输入:s = “PAYPALISHIRING”, numRows = 4。输入:s = “A”, numRows = 1。输出:“PAHNAPLSIIGYIR”输出:“PINALSIGYAHRPI”来源:力扣(LeetCode)
原创
2022-12-31 22:37:27 ·
289 阅读 ·
0 评论