dfs
[LeetCode] 200. Number of Islands (Daily Question)
문제 Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. 바다를 의미하는 0과 섬의 땅을 의미하는 1로 구성된 2차원 배열 grid가 주어졌을 때, 섬 해안선의 길이를 구하는 문제이다. Example 1: Input: grid =[ [..
![[LeetCode] 79. Word Search (Daily Question)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbpTbTX%2FbtsGiZAjorb%2FisEED46EIEPN2UaH9qTGYk%2Fimg.png)
[LeetCode] 79. Word Search (Daily Question)
문제 Given an m x n grid of characters board and a string word, return true if word exists in the grid. The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once. 영문자로 구성된 보드와 단어가 주어졌을 때, 단어가 보드에 있는지 판별하는 문제이다. 문자끼리는 가로 및 세로로 연결되어 있어야 한다. 에를 들면, board는 [["A","B","C","..