Minjeong / 5월 4주차 / 3문제 #214
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
BFS+구현문제를 풀었고, 다른 문제로는 java로 힙 유형 문제를 풀이해보았다. BFS 구현 문제의 경우, 큰 틀은 다 동일한 것 같다. 다만 방향이라거나, 맵이 이동한다거나 추가적인 조건을 다루는 것이 어려운 부분인 것 같다.#16509 장군 문제도 방향이 8가지나 되어 이동하는 걸 고려하는 것이 가장 헷갈렸던 부분이었다.#11559. Puyo Puyo는 중력을 처리하는 부분이 막막했다. Puyo가 터지게 되면 밑으로 내려오도로 하기 위해서 반복적으로 교환하며 풀이하는 부분이 인상적이었다. 나의 경우, 이 부분에서 막혀서 다른 분들의 정답을 보고 풀이를 이어가게 되었다.프로그래머스 고득점 kit - 더 맵게문제의 경우, Java에서Heap을 구현하기 위해서는PriorityQueue를 사용하면 된다는 것을 알게 되었다.🚀주간 목표 문제 수: 3개
백준 #16509. 장군: 그래프 / 골드5
정리한 링크: (바로가기)
🚩플로우 (선택)
🚩제출한 코드
💡TIL
백준 #11559. Puyo Puyo: 그래프 / 골드4
정리한 링크: (바로가기)
🚩플로우 (선택)
visited배열을 초기화한다.pang = True로 설정한다.pang이 참이면 블록을 아래로 내리고combo += 1🚩제출한 코드
💡TIL
down()함수에서 위에서 아래로 내려오도록 반복적으로 교환하는 방식이 인상 깊었다.프로그래머스 #42626. 더맵게: 힙 / Level2
정리한 링크: (바로가기)
🚩플로우 (선택)
while문을 통해:1반환.🚩제출한 코드
💡TIL
deque를 이용하여 쉽게 구현할 수 있던 부분을 Java로 접근하니 어떤 프레임워크를 써야 할 지 감이 오지 않았다.Java Heap이라고 검색하니 “PriorityQueue” 컬렉션이 나오게 되었다. 이 자료구조를 활용하여 풀이하니 쉽게 접근할 수 있었다.PriorityQueue자료형에서 사용하는 요소는offer,peek,poll이 있다.PriorityQueue를 써야만 하는 유형이었다.