Skip to content

Conversation

@Taeyong98
Copy link
Collaborator

No description provided.

Copy link
Owner

@lee-JunR lee-JunR left a comment

Choose a reason for hiding this comment

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

태용님 이번에 종합 리뷰 담당이셔서 바쁘셨을 텐데 1등으로 제출하셔서 놀랐어요! 갓생사시네요...정말 멋져요! 자극이 됩니다 풀이도 너무 잘 읽었습니다!

ps. 버퍼 닫는거 까먹지 말기! 😆

Comment on lines +15 to +16
Copy link
Owner

Choose a reason for hiding this comment

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

StringTokenizer 를 사용하는 방법도 있었네요!
각 문자를 입력받을 때마다 한번씩 루프를 도는 구조라 StringTokenizer를 사용하신건가요?
이럴경우에 배열로 입력받는것보다 어떤 이점이 있는지도 듣고싶네요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

첫 command를 읽고 push일 때만 다음 숫자를 입력받으면 되겠다고 생각했습니다. 사실 이점보다는 머릿속으로 생각난걸 구현한거에요!

Copy link
Owner

Choose a reason for hiding this comment

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

앗차! 버퍼 닫는걸 깜빡하셨어요! 😄

저번에 리뷰받은 내용인데
버퍼 관리를 수동으로 하는 BuffeeredReader이기에
br.close(), flush()를 마침표처럼 항상 아래에서 닫아주자는 의견이 있었어요!
태용님은 어떻게 생각하시는지 궁금하네요~

Comment on lines +18 to +38
Copy link
Owner

Choose a reason for hiding this comment

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

try catch 를 사용하셨네요! 저같은 경우 possible이라는 가능, 불가능을 관리하는 boolean 타입 변수를 추가로 지정해서 구해줬는데 이것도 실제 프로젝트 코드에서 자주 사용할법한 코드처럼 느껴지네요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

이게 사실 좋은 풀이법일지는 모르겠지만
bfs, dfs 문제 풀때 dx , dy 값을 갱신하는 과정에서 발생하는 인덱스 에러 처리하기 편하더라구여

Comment on lines +12 to +30
Copy link
Owner

Choose a reason for hiding this comment

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

루프에 입출력과 알고리즘이 동시에 일어나서 읽기가 힘드네요!
이를 해결하기 위해 알고리즘을 수정하는 것보다는 stack의 이름에 의미를 추가하거나 간단한 주석을 사용하는건 어떨까요?

코딩테스트는 협업이 아니지만 점점 복잡한 문제가 될수록 알고리즘을 다시 짜는 경우도 많고 그럴때마다 자신의 코드를 다시 읽는 경우도 왕왕 생기죠! 간단한 주석을 남기면 이게 뭐였지? 하는 경우도 줄어들 것 같네요!
또 저희는 스터디니까 이런 부분을 신경써주신다면 리뷰어들의 시간도 신경쓰는 배려심 넘치는 센스쟁이로 불릴 수 있을것같아요! (사실 이게 쪼끔 더 큼)

Comment on lines +28 to +29
Copy link
Owner

Choose a reason for hiding this comment

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

stack은 각 탑의 높이를 트래킹하고
stack2는 각 탑의 번호를 트래킹하고 있네요!

stack2의 기능은 i가 수행할 수 있을 것 같아요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

혹시 i가 수행할 수 있다는게 이해가 안 되는데 알려주실 수 있으실까여???

Copy link
Owner

Choose a reason for hiding this comment

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

stack 하나만 써서 풀이한 코드와 같은 코드일 것 같아요!

Copy link
Owner

Choose a reason for hiding this comment

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

저도 해당 부분을 먼저 생각했는데 stack.size로 구할 수 있더라구요... 보고 벽 쫌 느꼈습니다

@lee-JunR lee-JunR merged commit 5051163 into lee-JunR:main Jun 4, 2024
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.

2 participants