Minjeong / 6월 3주차 / 3문제 #226
Merged
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.
🌱WIL
과제문제에서는 0-1 BFS 유형을 알게 되었다.0-1 BFS를 구현하기 위해서는 우선순위가 높은 것은 (deque 기준으로) appendleft로 우선 탐색할 수 있도록 해주어야 한다는 것을 알게 되었다.키패드 누르기문제는 Level1이었지만 처음에 문제의 아이디어를 내기까지는 부끄럽지만 조금 시간이 걸렸다. 하지만 정말 단순하게 풀면 되는 문제였다.🚀주간 목표 문제 수: 3개
백준 #14226. 이모티콘: 그래프 / 골드4
정리한 링크: (바로가기)
(화면, 클립보드)상태를 저장한다.(screen, screen)(screen + clipboard, clipboard)— 단, clipboard가 0이 아니어야 함(screen - 1, clipboard)visited체크를 통해 중복 방문을 방지한다.S에 도달하면 해당 시간을 출력하고 종료한다.🚩플로우 (선택)
🚩제출한 코드
💡TIL
MAX값을 1001로 지정해야 했는데 1000으로 지정한 점 등 잘못 지정한 게 많았기에 시간 내에 풀지 못해 아쉽다.프로그래머스 #67256. 키패드 누르기: 그리디 / Level 1
정리한 링크: (바로가기)
🚩플로우 (선택)
*, 오른손은#이다.LR🚩제출한 코드
💡TIL
백준 #13549. 숨바꼭질3: 그래프 / 골드5
정리한 링크: (바로가기)
🚩플로우 (선택)
100000까지 탐색할 수 있도록 범위 상수를 선언한다.visited리스트를1로 초기화하여 방문 여부와 시간을 동시에 기록한다.deque를 생성하고 시작 위치를 넣는다.2 * x(순간이동):appendleft(), 시간 변화 없음x ± 1(걷기):append(), 시간 +1K에 도달하면 종료한다.🚩제출한 코드
💡TIL