SlideShare a Scribd company logo
1 of 17
PSEUDO CODE PRESENTATION
Rehmatullah Danish
BSCS-S-17-38
6th Semester
PSEUDO CODE
Pseudo means imitation and code refer to the instructions written in a programming
language.
Pseudo code is another programming analysis tools and its also called program design
language (PDL).
Pseudocode is an informal way of programming description that does not require any
strict programming language syntax or underlying technology considerations. It is used
for creating an outline or a rough draft of a program. Pseudocode summarizes a
program’s flow, but excludes underlying details. System designers write pseudocode to
ensure that programmers understand a software project's requirements and align
code accordingly.
PSEUDO CODE OF STACKS
Insert an element in stack.
Insertion(a,size)
full=size-1
If full then
print ‘STACK OVERFLOW’
exit
Else
Top=0 // stack empty
top=top+1
end if
a[top]=item
Exit
Delete an element from stack.
Deletion(item)
If top=0 then
print ‘STACK Empty’
exit
Else
Delete item
end if
top=top-1
Exit
Display element of stack.
Display()
If top=0 then
Print ‘STACK EMPTY’
Exit
Else
For i=top to 0
Print a[i]
End for
exit
PSEUDO CODE OF QUEUE
Insert an element in queue.
Insert rear()
[check for queue is over flow or not]
If (REAR >n) or (REAR==FRONT)
Print “queue is overflow”
else
// in next step
[enter the item]
QUEUE[REAR]=value
REAR=REAR+1
end
Delete an element in queue.
delete front()
[check for queue is under flow or not]
If front>N or front==Null
Print ”queue is empty”
else
// in next step
If front>rear
Front==null
Rear=-1
PSEUDO CODE OF CIRCULAR QUEUE
Enter item in Queue:
Check=Queue is full
if FRONT = 0 and REAR = N-1,
Queue =Overflow and Return
else
Set REAR = REAR + 1
Set QUEUE[REAR] = ITEM [This inserts new element]
Return
Delete item in queue
Check Queue empty
If FRONT = -1
Means ( Empty and Return)
Set ITEM = Queue[FRONT] //enter new value in FRONT)
If FRONT = REAR, then [Queue has only one element to start]
Set FRONT = -1 and REAR = -1
Else FRONT = N-1, then
Set FRONT = 0
PSEUDO CODE OF LIST
Inserting At Beginning of the list
Create a newNode
newNode → next = NULL.
If head== null then,
set head = newNode.
If head != null
temp =new node.
temp ->next=head
Head=temp
Set temp → next = newNode.
INSERTING AT END OF THE LIST
Create a newNode
If head == NULL
then
set newNode→next = NULL
head = newNode.
Else head != Null
temp = head
While temp->next != Null
Temp = temp-> next
Temp->next = newNode
newNode-> next=Null,
INSERTING AT CENTER OF THE LIST
newNode
Empty (head == NULL)
If it is Empty then, set newNode → next = NULL and head = newNode.
Index=1
Temp=head
Temp1=head
While index<=value
Temp=temp->next
Temp1=temp->next
Temp->next=newnode
newnode->next=temp1->next.
MAXIMUM VALUE IN THE ARRAY
SET Max to array[0]
FOR i = 1 to array length - 1
IF array[i] > Max THEN
SET Max to array[i]
ENDIF
ENDFOR
PRINT Max
ENTER VALUE IN THE ARRAY
Array[ size]
If size=array[size]-1
Array is full
Else
Array[size]++
REMOVE VALUE IN THE ARRAY
Array[ size]
If size=array[size]-1
Array is full
Else
Array[size]--
The End

More Related Content

What's hot

Priority Queue in Data Structure
Priority Queue in Data StructurePriority Queue in Data Structure
Priority Queue in Data StructureMeghaj Mallick
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back trackingTech_MX
 
Sorting Algorithms
Sorting AlgorithmsSorting Algorithms
Sorting AlgorithmsPranay Neema
 
Topological Sorting
Topological SortingTopological Sorting
Topological SortingShahDhruv21
 
trees in data structure
trees in data structure trees in data structure
trees in data structure shameen khan
 
Red black tree
Red black treeRed black tree
Red black treeRajendran
 
Algorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms IAlgorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms IMohamed Loey
 
Queue Data Structure
Queue Data StructureQueue Data Structure
Queue Data StructureZidny Nafan
 
sum of subset problem using Backtracking
sum of subset problem using Backtrackingsum of subset problem using Backtracking
sum of subset problem using BacktrackingAbhishek Singh
 
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURESTACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTUREArchie Jamwal
 
File handling in Python
File handling in PythonFile handling in Python
File handling in PythonMegha V
 
Insertion in singly linked list
Insertion in singly linked listInsertion in singly linked list
Insertion in singly linked listKeval Bhogayata
 

What's hot (20)

Priority Queue in Data Structure
Priority Queue in Data StructurePriority Queue in Data Structure
Priority Queue in Data Structure
 
Queue ppt
Queue pptQueue ppt
Queue ppt
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
 
Sorting Algorithms
Sorting AlgorithmsSorting Algorithms
Sorting Algorithms
 
Topological Sorting
Topological SortingTopological Sorting
Topological Sorting
 
Binary Search
Binary SearchBinary Search
Binary Search
 
trees in data structure
trees in data structure trees in data structure
trees in data structure
 
Red black tree
Red black treeRed black tree
Red black tree
 
Algorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms IAlgorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms I
 
Queue Data Structure
Queue Data StructureQueue Data Structure
Queue Data Structure
 
Balanced Tree (AVL Tree & Red-Black Tree)
Balanced Tree (AVL Tree & Red-Black Tree)Balanced Tree (AVL Tree & Red-Black Tree)
Balanced Tree (AVL Tree & Red-Black Tree)
 
Np cooks theorem
Np cooks theoremNp cooks theorem
Np cooks theorem
 
sum of subset problem using Backtracking
sum of subset problem using Backtrackingsum of subset problem using Backtracking
sum of subset problem using Backtracking
 
Linear Search Presentation
Linear Search PresentationLinear Search Presentation
Linear Search Presentation
 
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURESTACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURE
 
Data structure ppt
Data structure pptData structure ppt
Data structure ppt
 
File handling in Python
File handling in PythonFile handling in Python
File handling in Python
 
Insertion in singly linked list
Insertion in singly linked listInsertion in singly linked list
Insertion in singly linked list
 
Sorting
SortingSorting
Sorting
 
Linked list
Linked listLinked list
Linked list
 

Similar to Pseudo code of stack Queue and Array

please help me in C++Objective Create a singly linked list of num.pdf
please help me in C++Objective Create a singly linked list of num.pdfplease help me in C++Objective Create a singly linked list of num.pdf
please help me in C++Objective Create a singly linked list of num.pdfaminbijal86
 
Programming in Coday we are working with singly linked lists. Las.pdf
Programming in Coday we are working with singly linked lists. Las.pdfProgramming in Coday we are working with singly linked lists. Las.pdf
Programming in Coday we are working with singly linked lists. Las.pdfPRATIKSINHA7304
 
Revisiting a data structures in detail with linked list stack and queue
Revisiting a data structures in detail with linked list stack and queueRevisiting a data structures in detail with linked list stack and queue
Revisiting a data structures in detail with linked list stack and queuessuser7319f8
 
Stack concepts by Divya
Stack concepts by DivyaStack concepts by Divya
Stack concepts by DivyaDivya Kumari
 
Data structure lab manual
Data structure lab manualData structure lab manual
Data structure lab manualnikshaikh786
 
Add functions push(int n- Deque &dq) and pop(Deque &dq)- Functions pus.docx
Add functions push(int n- Deque &dq) and pop(Deque &dq)- Functions pus.docxAdd functions push(int n- Deque &dq) and pop(Deque &dq)- Functions pus.docx
Add functions push(int n- Deque &dq) and pop(Deque &dq)- Functions pus.docxWilliamZnlMarshallc
 
10 Linked Lists Sacks and Queues
10 Linked Lists Sacks and Queues10 Linked Lists Sacks and Queues
10 Linked Lists Sacks and QueuesPraveen M Jigajinni
 
Unit 2 linked list and queues
Unit 2   linked list and queuesUnit 2   linked list and queues
Unit 2 linked list and queueskalyanineve
 
Lecture 6: linked list
Lecture 6:  linked listLecture 6:  linked list
Lecture 6: linked listVivek Bhargav
 
Please help solve this in C++ So the program is working fin.pdf
Please help solve this in C++ So the program is working fin.pdfPlease help solve this in C++ So the program is working fin.pdf
Please help solve this in C++ So the program is working fin.pdfankit11134
 
in C++ , Design a linked list class named IntegerList to hold a seri.pdf
in C++ , Design a linked list class named IntegerList to hold a seri.pdfin C++ , Design a linked list class named IntegerList to hold a seri.pdf
in C++ , Design a linked list class named IntegerList to hold a seri.pdfeyewaregallery
 
data structure3.pptx
data structure3.pptxdata structure3.pptx
data structure3.pptxSajalFayyaz
 
Array linked list.ppt
Array  linked list.pptArray  linked list.ppt
Array linked list.pptWaf1231
 
Python Course for Beginners
Python Course for BeginnersPython Course for Beginners
Python Course for BeginnersNandakumar P
 

Similar to Pseudo code of stack Queue and Array (20)

please help me in C++Objective Create a singly linked list of num.pdf
please help me in C++Objective Create a singly linked list of num.pdfplease help me in C++Objective Create a singly linked list of num.pdf
please help me in C++Objective Create a singly linked list of num.pdf
 
Programming in Coday we are working with singly linked lists. Las.pdf
Programming in Coday we are working with singly linked lists. Las.pdfProgramming in Coday we are working with singly linked lists. Las.pdf
Programming in Coday we are working with singly linked lists. Las.pdf
 
Revisiting a data structures in detail with linked list stack and queue
Revisiting a data structures in detail with linked list stack and queueRevisiting a data structures in detail with linked list stack and queue
Revisiting a data structures in detail with linked list stack and queue
 
Stack concepts by Divya
Stack concepts by DivyaStack concepts by Divya
Stack concepts by Divya
 
Data structure lab manual
Data structure lab manualData structure lab manual
Data structure lab manual
 
List
ListList
List
 
Add functions push(int n- Deque &dq) and pop(Deque &dq)- Functions pus.docx
Add functions push(int n- Deque &dq) and pop(Deque &dq)- Functions pus.docxAdd functions push(int n- Deque &dq) and pop(Deque &dq)- Functions pus.docx
Add functions push(int n- Deque &dq) and pop(Deque &dq)- Functions pus.docx
 
10 Linked Lists Sacks and Queues
10 Linked Lists Sacks and Queues10 Linked Lists Sacks and Queues
10 Linked Lists Sacks and Queues
 
Unit 2 linked list and queues
Unit 2   linked list and queuesUnit 2   linked list and queues
Unit 2 linked list and queues
 
Lecture 6: linked list
Lecture 6:  linked listLecture 6:  linked list
Lecture 6: linked list
 
DSA(1).pptx
DSA(1).pptxDSA(1).pptx
DSA(1).pptx
 
Please help solve this in C++ So the program is working fin.pdf
Please help solve this in C++ So the program is working fin.pdfPlease help solve this in C++ So the program is working fin.pdf
Please help solve this in C++ So the program is working fin.pdf
 
in C++ , Design a linked list class named IntegerList to hold a seri.pdf
in C++ , Design a linked list class named IntegerList to hold a seri.pdfin C++ , Design a linked list class named IntegerList to hold a seri.pdf
in C++ , Design a linked list class named IntegerList to hold a seri.pdf
 
data structure3.pptx
data structure3.pptxdata structure3.pptx
data structure3.pptx
 
137 Lab-2.2.pdf
137 Lab-2.2.pdf137 Lab-2.2.pdf
137 Lab-2.2.pdf
 
Array linked list.ppt
Array  linked list.pptArray  linked list.ppt
Array linked list.ppt
 
Data structure
Data  structureData  structure
Data structure
 
data structure
data structuredata structure
data structure
 
Python Course for Beginners
Python Course for BeginnersPython Course for Beginners
Python Course for Beginners
 
Ds program-print
Ds program-printDs program-print
Ds program-print
 

Recently uploaded

EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 

Recently uploaded (20)

EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 

Pseudo code of stack Queue and Array

  • 1.
  • 2. PSEUDO CODE PRESENTATION Rehmatullah Danish BSCS-S-17-38 6th Semester
  • 3. PSEUDO CODE Pseudo means imitation and code refer to the instructions written in a programming language. Pseudo code is another programming analysis tools and its also called program design language (PDL). Pseudocode is an informal way of programming description that does not require any strict programming language syntax or underlying technology considerations. It is used for creating an outline or a rough draft of a program. Pseudocode summarizes a program’s flow, but excludes underlying details. System designers write pseudocode to ensure that programmers understand a software project's requirements and align code accordingly.
  • 4. PSEUDO CODE OF STACKS Insert an element in stack. Insertion(a,size) full=size-1 If full then print ‘STACK OVERFLOW’ exit Else Top=0 // stack empty top=top+1 end if a[top]=item Exit
  • 5. Delete an element from stack. Deletion(item) If top=0 then print ‘STACK Empty’ exit Else Delete item end if top=top-1 Exit
  • 6. Display element of stack. Display() If top=0 then Print ‘STACK EMPTY’ Exit Else For i=top to 0 Print a[i] End for exit
  • 7. PSEUDO CODE OF QUEUE Insert an element in queue. Insert rear() [check for queue is over flow or not] If (REAR >n) or (REAR==FRONT) Print “queue is overflow” else // in next step [enter the item] QUEUE[REAR]=value REAR=REAR+1 end
  • 8. Delete an element in queue. delete front() [check for queue is under flow or not] If front>N or front==Null Print ”queue is empty” else // in next step If front>rear Front==null Rear=-1
  • 9. PSEUDO CODE OF CIRCULAR QUEUE Enter item in Queue: Check=Queue is full if FRONT = 0 and REAR = N-1, Queue =Overflow and Return else Set REAR = REAR + 1 Set QUEUE[REAR] = ITEM [This inserts new element] Return
  • 10. Delete item in queue Check Queue empty If FRONT = -1 Means ( Empty and Return) Set ITEM = Queue[FRONT] //enter new value in FRONT) If FRONT = REAR, then [Queue has only one element to start] Set FRONT = -1 and REAR = -1 Else FRONT = N-1, then Set FRONT = 0
  • 11. PSEUDO CODE OF LIST Inserting At Beginning of the list Create a newNode newNode → next = NULL. If head== null then, set head = newNode. If head != null temp =new node. temp ->next=head Head=temp Set temp → next = newNode.
  • 12. INSERTING AT END OF THE LIST Create a newNode If head == NULL then set newNode→next = NULL head = newNode. Else head != Null temp = head While temp->next != Null Temp = temp-> next Temp->next = newNode newNode-> next=Null,
  • 13. INSERTING AT CENTER OF THE LIST newNode Empty (head == NULL) If it is Empty then, set newNode → next = NULL and head = newNode. Index=1 Temp=head Temp1=head While index<=value Temp=temp->next Temp1=temp->next Temp->next=newnode newnode->next=temp1->next.
  • 14. MAXIMUM VALUE IN THE ARRAY SET Max to array[0] FOR i = 1 to array length - 1 IF array[i] > Max THEN SET Max to array[i] ENDIF ENDFOR PRINT Max
  • 15. ENTER VALUE IN THE ARRAY Array[ size] If size=array[size]-1 Array is full Else Array[size]++
  • 16. REMOVE VALUE IN THE ARRAY Array[ size] If size=array[size]-1 Array is full Else Array[size]--