Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.

Continue reading “Leetcode: Min Stack”

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.

Continue reading “Leetcode: Min Stack”

Design a data structure that supports reqiured operations in O(1) time.

Continue reading “Insert Delete GetRandom O(1)”