I need help with a c++ code, i am new learner on stack, pleasehelp me write Stack.cpp according to Stack.h provided,thanks(Notes: That data structure is a singly linked listin which pushed items are placed at the tail of the linked list.Similarly, popped items will be removed from the tail of the list.)Actually,I can write a regular one, but i’m not sure how to use thetail in the question.
class Stack {
private:
// Desc: Nodes for a singly-linked list
class StackNode {
public:
int data;
StackNode * next;
};
// Desc: head = ptr to the first StackNode (NULL if empty)
// tail = ptr to the last StackNode (NULL
PayPal Gateway not configured
PayPal Gateway not configured