-
-
Notifications
You must be signed in to change notification settings - Fork 305
[dev_qorh] WEEK 06 solutions #2196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
radiantchoi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
안녕하세요! 이번주 리뷰를 제가 해 드리게 되었습니다. 전반적으로 생각하신 과정을 주석에 남겨 주셔서 저도 보고 이해하고 지식이 느는 데 큰 도움이 됐습니다. 이번 주에는 저 또한 TypeScript를 학습하는 취지를 가지고, 처음 사용해 보는 TypeScript를 써서 문제를 풀다 보니, 제가 어느 정도 풀기 전에는 리뷰를 드릴 수 없었던 점 양해 부탁드립니다. 스포일러 차단이랄까요.. 이번주도 고생 많으셨습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
컴퓨터가 선택하는 과정을 찾아가는 것 같아서 흥미로웠던 기억이 납니다. 면적이란 (둘 중 낮은 봉의 높이) * (인덱스 차이)라는 것까지는 저도 이전에 비슷한 문제를 풀어 본 경험이 있어 감이 왔는데, 시간복잡도에서 애를 먹었거든요. 투 포인터를 쓰자는 아이디어를 떠올리고, 둘 중 어느 쪽의 포인터를 움직여야 모든 경우의 수를 파악할 수 있을까? 라는 물음에, 컴퓨터라면 높이가 낮은 쪽을 제거하겠지! 라는 것을 떠올려 흥미로웠던 기억이 납니다. 거의 저와 같은 흐름을 타셔서 공감이 되네요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제가 이번주에 유일하게 Swift로 푼 문제군요! 주로 사용하는 언어로 자료구조를 구현하는 것은 중요한 것 같습니다. 와일드카드 문자가 있는 Trie는 그 시점에서 DFS를 태우면 된다고, 이전에 AI와 대화해 봤던 기억이 나네요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저 또한 xMinimum, yMaximum 따위를 구현하려고 하다가 분기처리하는 것이 너무 헷갈려서 visited 배열을 정의하는 식으로 풀었는데, 이 부분을 완벽하게 컨트롤해 주셨군요! 인상적입니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
시작 괄호를 미리 정의된 배열로 가져다놓는 것도 좋은 것 같습니다! 보통 이런 문제들은 마지막에 스택이 비었는지만 체크하지만, 조금 코드가 복잡해지더라도 제시해주신 풀이처럼 early return을 사용한다면 일종의 최적화가 되는 효과가 있겠지요.
답안 제출 문제
작성자 체크 리스트
In Review로 설정해주세요.검토자 체크 리스트
Important
본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!