8000 refactor 6 · codingwhite/Leetcode-4@b11d11a · GitHub
[go: up one dir, main page]

Skip to content

Commit b11d11a

Browse files
refactor 6
1 parent 7085441 commit b11d11a

File tree

1 file changed

+6
-2
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+6
-2
lines changed

src/main/java/com/fishercoder/solutions/_6.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
package com.fishercoder.solutions;
22

3-
/**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)
3+
/**
4+
* 6. ZigZag Conversion
5+
*
6+
* The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this:
7+
* (you may want to display this pattern in a fixed font for better legibility)
48
59
P A H N
610
A P L S I I G
711
Y I R
12+
813
And then read line by line: "PAHNAPLSIIGYIR"
914
Write the code that will take a string and make this conversion given a number of rows:
1015
1116
string convert(string text, int nRows);
1217
convert("PAYPALISHIRING", 3) should return "PAHNAPLSIIGYIR".
13-
1418
*/
1519

1620
public class _6 {

0 commit comments

Comments
 (0)
0