leetcode icon indicating copy to clipboard operation
leetcode copied to clipboard

Bug Report for minimum-stack

Open TopGEO opened this issue 2 months ago • 0 comments

Bug Report for https://neetcode.io/problems/minimum-stack

Problem says pop, top and getMin will always be called on non-empty stacks..

However, when submitting, it requires empty stack consideration for some methods. Example:

java.util.EmptyStackException
	at java.base/java.util.Stack.peek(Stack.java:101)
	at Main$MinStack.pop(Main.java:17)
	at Main.main(Main.java:63)

Expected Behavior: Based on the problem guarantee, methods should not need to handle empty stack cases.

TopGEO avatar Sep 26 '25 17:09 TopGEO