...

/

Challenge 10: Create Stack where min() gives minimum in O(1)

Challenge 10: Create Stack where min() gives minimum in O(1)

Try to solve the Min Stack problem.

Statement

Design a stack data structure to retrieve the minimum value in O(1)O(1) time. The following functions must be implemented:

  • min(): Returns the minimum value in the stack in
...