Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb11d11a

Browse files
refactor 6
1 parent7085441 commitb11d11a

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
packagecom.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
publicclass_6 {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp