-
프로그래머스 - 덧칠하기Algorithm 2023. 5. 3. 15:27
문제
풀이
풀고자 했던 의도는 먼저 칠해진 벽은 1 칠해지지 않은 벽은 0으로 채워진 wallArray 배열을 만들고, wallArray 배열에서 칠해지지 않은 벽 즉, 값이 0인 가장 첫 index부터 index + 롤러의길이m -1 까지 모두 1을 대입해 벽을 칠한다. 이 과정을 wallArray에서 0이 없을 때 까지 반복한다.
'Algorithm' 카테고리의 다른 글
프로그래머스 - [카카오 인턴] 키패드 누르기 (0) 2023.05.06 프로그래머스 - 두 개 뽑아서 더하기 (0) 2023.05.04 프로그래머스 - 다음 큰 숫자 (0) 2023.05.02 프로그래머스 - 짝지어 제거하기 (0) 2023.05.02 프로그래머스 - 명예의 전당 (1) (0) 2023.04.28