Skip to content

Commit 15938eb

Browse files
committed
issue sowon-dev#28 Grid Challenge java w/ Explanation
1 parent dfec6a0 commit 15938eb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/hackerrank/GridChallenge.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static String gridChallenge(String[] grid) {
1818
}
1919
// System.out.println(Arrays.toString(grid));
2020

21-
// 2. 열을 사전순 정렬인지 확인하기
21+
// 2. 열이 사전순 정렬인지 확인하기
2222
// 지금 열과 다음 열의 i번째를 비교하여 사전순이 아니면 NO를 출력
2323
for (int i = 0; i < grid[0].length(); i++) {
2424
for (int j = 0; j < grid.length - 1; j++) {
@@ -28,7 +28,6 @@ static String gridChallenge(String[] grid) {
2828
}
2929
}
3030
}
31-
3231
return "YES";
3332
}
3433

@@ -40,6 +39,5 @@ public static void main(String[] args) {
4039
// System.out.println(gridChallenge(new String[]{"ppp", "ypp", "wyw"}) + ", ans:YES");
4140
// System.out.println(gridChallenge(new String[]{"eibjbwsp", "ptfxehaq", "jxipvfga", "rkefiyub", "nflvjznh"}) + ", ans:NO");
4241
// System.out.println(gridChallenge(new String[]{"kalwfhfj", "lktajiaq", "srdgoros"}) + ", ans:YES");
43-
4442
}
4543
}

0 commit comments

Comments
 (0)