你的位置:首页 > 软件开发 > Java > No.006:ZigZag Conversion

No.006:ZigZag Conversion

发布时间:2016-09-26 23:00:05
题目:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display th ...

题目:

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  NA P L S I I GY  I  R

Write the code that will take a string and make this conversion given a number of rows:

string convert(string text, int nRows);

官方难度:

Easy

翻译:

字符串"PAYPALISHIRING",被拆成几列写成如下ZigZag模式,写出转译的代码。

例子:

以上的例子如果表达的不够清楚,再给一个清晰的例子:

a     g     m    s     y

原标题:No.006:ZigZag Conversion

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录