[유병규-12주차 알고리즘 스터디] #59
Open
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.
🚀 싸피 15반 알고리즘 스터디 12주차 [유병규]
📌 문제 풀이 개요
✅ 문제 해결 여부
💡 풀이 방법
문제 1: 틱택토
문제 난이도
문제 유형
접근 방식 및 풀이
문제 2: 미친 로봇
문제 난이도
문제 유형
접근 방식 및 풀이
1.220703125E-4
형태로 출력이 되어BigDecimal
의toPlainString()
을 사용해 해결할 수 있었습니다.문제 3: 입국심사
문제 난이도
문제 유형
접근 방식 및 풀이
counting
을 하는 중간에 만약m
보다 많다면 반복문을 그만두도록 조건문을 추가했는데 이 조건문이 없다면counting
메소드의count
값이long
범위를 넘어설 수 있기 때문에 주의해야합니다.문제 4: 호석이 두 마리 치킨
문제 난이도
문제 유형
접근 방식 및 풀이
0 based-indexing
으로 구현하였으며, 문제의 정답을 작은 번호가 더 작은 것, 작은 번호가 같을 경우 큰 번호가 더 작은 거를 출력해야 하기에 반복문으로 해결하였습니다.문제 5: 양팔저울
문제 난이도
문제 유형
접근 방식 및 풀이
문제 6: 소트 게임
문제 난이도
문제 유형
접근 방식 및 풀이
swap
을 수행하고Arrays.toString()
을 통해 중복 체크를 하는 방법으로 접근하였습니다.swap
을 수행했습니다. 이때swap
한 배열이 이전에 나왔던 배열이라면 그 배열에 대해서는 더 이상 수행을 하면 안 되므로 이를 판단하기 위해HashSet<String>
을 사용했습니다.