// Stack implemented as a linked list -- Pouya Larjani typedef char* element; // Type of elements in the stack typedef struct node_s* node; // Stack node (pointer) type struct node_s { // Node structure element data; // Current node's data node below; // Pointer to the node below this one }; typedef struct stack_s* stack; // Stack (pointer) type struct stack_s { // Stack structure node top; // Top node of the stack int height; // Height of the stack }; stack bottom(); // Make a new stack int height(stack s); // Height of the stack element top(stack s); // Top element of the stack void pop(stack s); // Pop the top element of a stack void push(stack s, element data); // Push an element to the top of the stack void print_stack(stack s); // Print a stack