Skip to content

Conversation

yunseorim1116
Copy link
Member

No description provided.

@lukasjhan lukasjhan merged commit 766bf1c into main Mar 1, 2024
Comment on lines 31 to 35
this.minStack[this.minStack.length - 1] >
this.array[this.minStack.length - 1]
) {
this.minStack.push(this.minStack[this.minStack.length - 1]);
} else {
Copy link
Member Author

Choose a reason for hiding this comment

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

minStack과 stack의 길이를 맞추어 주어야 나중에 부작용이 없음.

Copy link
Member

Choose a reason for hiding this comment

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

pop할때 계산하면 중복된 값을 처리할 수 없기 때문입니다. :)

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