Skip to content

Files

Latest commit

author
zhengzhihao
Dec 4, 2017
4e0257f · Dec 4, 2017

History

History

6_ZigZag_Conversion

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 4, 2017
Dec 4, 2017
Nov 28, 2017

#6 字符串的Z型变换

问题描述

zigZag conversion 字符串"PAYPALISHIRING"在给定行数的情况下,Z型模式如上图所以,从横向读字符串即为: "PAHNAPLSIIGYIR",给定 字符串和行数完成代码string convert(string text, int nRows)的实现,如给定convert("PAYPALISHIRING",3) 则返回"PAHNAPLSIIGYIR"。

解答