Sumo Logic interview question

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

Interview Answer

Anonymous

Apr 7, 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