Implement stack that holds minimum
Anonymous
Stack has global minimum, each node has minimum. Whenever you push node, nodes minimum = stacks global minimum. That way when you pop, the stacks global minimum = min(top node min, stack min)
Check out your Company Bowl for anonymous work chats.