We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c49237b commit 232f11aCopy full SHA for 232f11a
word-search/jaejeong.java
@@ -7,7 +7,7 @@ public boolean exist(char[][] board, String word) {
7
// 상하좌우 방문 여부 체크하면서 DFS 탐색
8
// index 기준으로 word와 비교하면서 같을 때만 추가 탐색
9
// 시간복잡도: O(M * N * 4^L) > M: board 행, N: board 열, 4: 상하좌우 4방향, L: word의 길이
10
- // 공간복잡도: O(1) > 별도 메모리 할당하지 않음
+ // 공간복잡도: O(L) > word의 길이
11
for (int i = 0; i < board.length; i++) {
12
for (int j = 0; j < board[0].length; j++) {
13
if (dfs(board, i, j, word, 0)) {
0 commit comments