style: format code (#4212)

close #4204
This commit is contained in:
acbin
2023-06-09 18:52:05 +08:00
committed by GitHub
parent ad03086f54
commit 00282efd8b
521 changed files with 5233 additions and 7309 deletions

View File

@@ -7,14 +7,16 @@ class zigZagPattern {
int start = 0, index = 0, height = 1, depth = numRows;
char[] zigZagedArray = new char[s.length()];
while (depth != 0) {
int pointer = start, height_space =
2 + ((height - 2) * 2), depth_space = 2 + ((depth - 2) * 2);
int pointer = start, height_space = 2 + ((height - 2) * 2),
depth_space = 2 + ((depth - 2) * 2);
boolean bool = true;
while (pointer < s.length()) {
zigZagedArray[index++] = s.charAt(pointer);
if (height_space == 0) pointer += depth_space; else if (
depth_space == 0
) pointer += height_space; else if (bool) {
if (height_space == 0)
pointer += depth_space;
else if (depth_space == 0)
pointer += height_space;
else if (bool) {
pointer += depth_space;
bool = false;
} else {