Skip to content

Commit 15938eb

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

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

โ€Ž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)