알고리즘 스터디 1주차
·
Algorithm/소마 알고리즘 스터디
이 글은 Velog에서 이전한 글입니다. Velog 원문 보기1번 문제: BFS문제: https://leetcode.com/problems/minesweeper/description/풀이 소요 시간: 30분알고리즘: BFSfrom collections import dequed = [[-1,-1], [-1,0], [0,-1], [1,1], [1,0], [0,1], [1,-1], [-1,1]]class Solution: def updateBoard(self, board: List[List[str]], click: List[int]) -> List[List[str]]: R, C = len(board), len(board[0]) q = deque([(click[0], click[1..