mirror of
https://github.com/20kaushik02/leetcode-gulag.git
synced 2025-12-06 07:04:06 +00:00
14 lines
310 B
C++
14 lines
310 B
C++
#include "soln.hpp"
|
|
|
|
int main()
|
|
{
|
|
MinStack *minStack = new MinStack();
|
|
minStack->push(-2);
|
|
minStack->push(0);
|
|
minStack->push(-3);
|
|
cout << minStack->getMin() << endl; // return -3
|
|
minStack->pop();
|
|
cout << minStack->top() << endl; // return 0
|
|
cout << minStack->getMin() << endl; // return -2
|
|
return 0;
|
|
} |