Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🧷 문제 링크
https://school.programmers.co.kr/learn/courses/30/lessons/388353
🧭 풀이 시간
30분
👀 체감 난이도
✏️ 문제 설명
지게차로 창고에서 접근이 가능한 해당 종류의 컨테이너 모두 꺼낸다.
접근이 가능한 컨테이너는 4면 중 적어도 1면이 창고 외부와 연결된 컨테이너를 말함.
알파벳 하나로만 출고 요청이 들어올 경우 -> 접근 가능한 컨테이너를 꺼냄
같은 알파벳이 두 번 반복된 경우 -> 요청된 종류의 모든 컨테이너를 꺼냄
모든 요청 수행한 수 남은 컨테이너 수 구하기
🔍 풀이 방법
request를 하나씩 실행하면서 1번 2번 케이스 분류 후
bfs 알고리즘인 check함수 통해서 접근 가능 여부 확인하고 삭제시킴
⏳ 회고
차근히 풀면된다