graphs-dfs2 [Graphs] DFS.2 -Number of Islands https://leetcode.com/problems/number-of-islands/ Number of Islands - LeetCode Number of Islands - 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 ass leetcode.com 이번에는 Graph문제에서 인접행렬을 이용한 풀이를 알아보자. 구하고자 하는것 : 섬의 갯.. 2023. 2. 9. [Graphs] Graphs- DFS - Number of Provinces https://leetcode.com/problems/number-of-provinces/ Number of Provinces - LeetCode Number of Provinces - There are n cities. Some of them are connected, while some are not. If city a is connected directly with city b, and city b is connected directly with city c, then city a is connected indirectly with city c. A province is a group of d leetcode.com 이번에는 Graph에서 DFS 용으로 예제 문제풀이를 볼려고하는데 만만치가않다. 일.. 2023. 2. 8. 이전 1 다음