Question d’entretien chez Sumo Logic

Design a datastructure that does an insert,delete,find minimum in constant time.

Réponse à la question d'entretien

Utilisateur anonyme

7 avr. 2019

Can you describe a little more. One solution achieves this using 2 stacks? - one stack to push and pop elements - another stack to keep pushing the minimum element, as the new elements are pushed, and pop out when the 1st stack element is popped