Professional Documents
Culture Documents
Lab Assignment 2 - 3
Lab Assignment 2 - 3
Lab Assignment 2 - 3
(Note: You can make single function for all operations/independent function for each
problem)
Push
Pop
IsFull
isEmpty
Peek
stackTop
Create a stack structure and stack class for the above said implementation.
Q4 Implement linear queue by writing a class and also implement the following functions:
Insert or enqueue
Remove or dequeue
Isfull
Isempty
Write main function to exemplify the results. Also write a main function to make the implementation
a “Menu-Driven”.
Q5 Implement priority queue by writing a class and also implement the following functions:
Insert or enqueue
Remove or dequeue
Isfull
Isempty
Write main function to exemplify the results. Also write a main function to make the implementation
a “Menu-Driven”.
Q6 Write a program to perform sorting of a given array using the following algorithms:
Bubble sort
Insertion Sort using arrays and linked list
Selection Sort
Quick Sort
MergeSort
Shell Sort
Count Sort
Radix Sort