반응형 number-of-islands1 #31 [파이썬] LeetCode: Number of Islands https://leetcode.com/problems/number-of-islands/ Number of Islands - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 코드 class Solution: def dfs(self, grid: List[List[str]], i: int, j: int): if i = len(grid) or j = len(grid[0]) or grid[i][j] == '0': return grid[i.. 2022. 2. 12. 이전 1 다음 728x90 반응형