Skip to content

Conversation

@Yoepee
Copy link
Member

@Yoepee Yoepee commented Jun 30, 2025

📌 문제 링크

프로그래머스 60058번 - 괄호 변환

✨ 풀이 요약

  • 재귀를 사용해 괄호 문자열을 "균형잡힌 문자열"과 "올바른 문자열"로 나누어 변환
  • 문자열을 두 부분으로 분리하고 조건에 맞게 재귀적으로 처리

✅ 풀이 완료

image

  • 테스트 케이스 통과 완료

@haemin4738
Copy link
Collaborator

주석도 달아주셔서 모르는 상태로 봐도 이해하기 편하네요!
잘 작성된 것 같습니다.

Copy link
Collaborator

@jjuchan jjuchan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String이 불변 객체라서 문자열을 반복해서 이어붙이면 매번 새로운 객체를 생성하게 되어, 나중에 큰 입력에서는 시간 초과나 메모리 오류가 날 수 있을 것 같습니다!! StringBuilder를 사용해서 이어붙이고 마지막에 toString()으로 변환하면 성능 측면에서 더 안전하고 효율적일 것 같습니다!

@Yoepee Yoepee merged commit 12b3922 into main Jul 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants