C++ Program to Implement Queue Operations Using Linked List (Algorithm)

July 10, 2016

AIM:

Write a C++ program to implement Queue operations using Linked List.

ALGORITHM:

PROCEDURE CREATE_QUEUE(TOP)
[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)
return
else
Call CREATE_QUEUE (LINK(TOP))

3. [FINISH]
return.

Tagged in: ,
About Author
Adeeb C (219 Articles)

Adeeb C is the founder of this website. He is a blogger and web developer. And he writes about latest technology news, gadgets and windows since last four years.