편집 시간: 2022년 2월 9일 오후 6:44

코드

Algorithm/1012.py at main · Junroot/Algorithm

풀이

bfs또는 dfs로 인접한 배추들의 그룹의 개수를 구하면 된다.