Stack is a list of elements in which insertions and deletions are at the same end of the list called top.
The other end is known as Bottom.Insertion is also known as push,deletion is also known as popA priority queue is a type of data structure that allows for elements to be inserted in any order, and to be retrieved in the order of some priority, defined by the creator.
This is a program for implementation of the stack using single linked list. The operations performed on a stack are:
push(): This is the function which is for insertion(pushing)of an element into stack. It is similar to the insertion of an element at the end of a single linked list see the function insert_end() in the program for operations of single linked
pop(): This is the function which is for deletion(popping up) of an element from the stack. It is similar to the deletion of an element at the end of a single linked list see the function delete_end() in the program for operations of single linked list.
stack_display():This is the function which is for displaying the elements of a stack. It is similar to the forward traversal of a single linked list see the function ftraverse() in the program for operations of single linked list.