You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.?title=Bug Report for evaluate-reverse-polish-notation
This is not working (1)
public void pop() {
if(stack.empty()) {
return;
}
int top = stack.peek();
if (stack.peek() == min.peek()) {
min.pop();
}
stack.pop();
}
This is working
public void pop() {
if(stack.empty()) {
return;
}
int top = stack.peek();
if (top == min.peek()) {
min.pop();
}
stack.pop();
}
This may not be a bug but as I think the two function should return the same result. Can you check? As always, thanks and appreciate all the works of you and your team.
The text was updated successfully, but these errors were encountered:
Bug Report for https://neetcode.io/problems/minimum-stack
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.?title=Bug Report for evaluate-reverse-polish-notation
This is not working (1)
This is working
This may not be a bug but as I think the two function should return the same result. Can you check? As always, thanks and appreciate all the works of you and your team.
The text was updated successfully, but these errors were encountered: