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://www.acmicpc.net/problem/5430
🧭 풀이 시간
20분-
👀 체감 난이도
✏️ 문제 설명
배열을 입력받아서 문제에서 제시한 새로운 연산 규칙에 따라 배열을 연산하고
출력 포맷에 맞게 출력하는 문제입니다.
R : 배열 뒤집기, D : 배열 제일 앞에서 1개 빼기 입니다.
🔍 풀이 방법
배열을 실제로 뒤집지 않고 덱을 활용하여 현재 상태에 따라 pollFirst, pollLast를 이용하여 풀었습니다.
문제의 접근방식이나 풀이 자체는 어렵지 않았으나 입력, 출력의 형태가 독특해서 고민했습니다.
⏳ 회고
알고리즘 문제 풀이가 오랜만이어서 출력 시간 최적화로 몇번 틀렸는데 초심을 찾아야될 것 같습니다.