Question d’entretien chez Microsoft

Implement stack that holds minimum

Réponse à la question d'entretien

Utilisateur anonyme

1 févr. 2019

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)