-
Notifications
You must be signed in to change notification settings - Fork 126
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
[jj7779607] Week6 #903
base: main
Are you sure you want to change the base?
[jj7779607] Week6 #903
Conversation
valid-parentheses/limlimjo.js
Outdated
if (brackets[i]) { | ||
stack.push(brackets[i]); | ||
// 닫는 괄호일 경우 | ||
} else if (i !== stack.pop()) { |
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.
js에서는 스택이 비었을 때, stack.pop()
사용의 리턴 결과가 어떻게 되나요??
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.
undefined를 반환하게 됩니다. 스택이 비었을 때를 고려하지 못했는데 확인 감사합니다!
* @return {number} | ||
*/ | ||
var maxArea = function (height) { | ||
// Two Pointer를 이용해서 문제를 접근해야할 것 같은데 두 포인터 중에 어떤 거를 이동시켜야하는지 이 부분이 고민이 됨. |
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.
6주차 문제 풀이 고생 많으셨습니다!
7주차도 파이팅입니다!
답안 제출 문제
체크 리스트
In Review
로 설정해주세요.