Write a program to create a custom stack class with a GetMin() method to retrieve the minimum element in constant time.
HardProblem Statement
Write a program to create a custom stack class with a GetMin() method to retrieve the minimum element in constant time.
Sample Input
Operations: Push(5), Push(3), Push(7), Pop(), GetMin()
Sample Output
Minimum Element: 3
Limits
Time: 2s · Memory: 256 MB