Memory Limit Exceeded using a struct , doing delete and new

I’m using a struct to simulate the stack, like a LinkedList but I’m getting Memory Limit Exceeded.
I’m also doing new(push) and delete (pop).
struct NodeStack {
int mini;
int val;
NodeStack *next;
NodeStack(int minimun, int x): mini(minimun), val(x), next(NULL) {}
};
Why? What Can I do?

Click here to start solving coding interview questions