Professional Documents
Culture Documents
Lab Digital Assignment - 1 Data Structure and Algorithm (CSE-2011)
Lab Digital Assignment - 1 Data Structure and Algorithm (CSE-2011)
Experiment 1 :
a) Implementation of stack data structure and its operation
Code :
Output :
Code:
Output :
Experiment-2 :
a) Implementation of Queue using array :
Code:
Output :
➢ Inserting elements into the queue:
c) Simple Queue :
Code :
Output :
➢ Insertion of elements :
➢ Display elements :
➢ Deletion of elements :
d) Circular Queue :
Code:
Output :
f) Application of queue :
The FCFS(first come first serve) is one of the application of queue.
Code:
Output :
Experiment 3:
a) Singly Linked list –
Code :
Output :
Code:
Output :
This code creates a class CircularLinkedList that provides several
basic operations such as insert element at begin, insert element
at end, delete element at begin, display the list.
Code:
Output :