
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

void push (int x) // push a value onto the stack and adjust pointers accordingly class dStack { protected: struct node { int item; node *prev; } node *top; node *get_node(); void free_node(node *); public: dStack(); void push (int x); int pop (); };