C++ Program to Implement Queue Operations Using Linked List (Algorithm)
Write a C++ program to implement Queue operations using Linked List.
[Where ‘head’ pointer has been caught in pointer ‘TOP’ and function is void]
1. [Allocating memory for new node & having the value from user]
Call GETNODE (TOP)
DATA (TOP) <– ‘xyz’
LINK (TOP) <– 0.
2. [Checking the value of last node & calling the function recursiverly]
if(DATA (TOP) <= 0)
Call CREATE_QUEUE (LINK(TOP))