FDS - Lab - Manual AI-DS (1to13) - Final
FDS - Lab - Manual AI-DS (1to13) - Final
SEM-I
LAB MANUAL
Course Coordinator
Prof. Rohini Shrikhande
DEPARTMENT OF
ARTIFICIAL INTELLIGENCE & DATA SCIENCE
Vision:
Imparting quality education in the field of Artificial Intelligence and Data Science
Mission:
To include the culture of R and D to meet the future challenges in AI and DS.
To develop technical skills among students for building intelligent systems to
solve problems.
To develop entrepreneurship skills in various areas among the students.
To include moral, social and ethical values to make students best citizens of country.
Program Educational Outcomes:
1. To prepare globally competent graduates having strong fundamentals, domain knowledge,
updated with modern technology to provide the effective solutions for engineering problems.
2. To prepare the graduates to work as a committed professional with strong professional ethics
and values, sense of responsibilities, understanding of legal, safety, health, societal, cultural
and environmental issues.
3. To prepare committed and motivated graduates with research attitude, lifelong learning,
investigative approach, and multidisciplinary thinking.
4. To prepare the graduates with strong managerial and communication skills to work
effectively as individuals as well as in teams.
1. Professional Skills- The ability to understand, analyze and develop computer programs in the
areas related to algorithms, system software, multimedia, web design, networking, artificial
intelligence and data science for efficient design of computer-based systems of varying
complexities.
2. Problem-Solving Skills- The ability to apply standard practices and strategies in software
project development using open-ended programming environments to deliver a quality product
for business success.
Table of Contents
Contents
1. Guidelines to manual usage .................................................................................................................. 4
This manual will provide a tool to facilitate the session on Digital Communication modules in
collaborative learning environment.
K A D I
Applying Problem Analysis Design & Investigation
Knowledge Development of problems
M E E T
Modern Tool Engineer Environment Ethics
Usage & Sustainability
Society
T O M I
Individual & Communication Project Life-Long
Team work Management Learning
& Finance
Program Outcomes:
1. Engineering knowledge: An ability to apply knowledge of mathematics, including
discrete mathematics, statistics, science, computer science and engineering fundamentals to
model the software application.
2. Problem analysis: An ability to design and conduct an experiment as well as interpret
data, analyze complex algorithms, to produce meaningful conclusions and recommendations.
3. Design/development of solutions: An ability to design and development of software
system, component, or process to meet desired needs, within realistic constraints such as
economic, environmental, social, political, health & safety, manufacturability, and
sustainability.
4. Conduct investigations of complex problems:An ability to use research based
knowledge including analysis, design and development of algorithms for the solution of
complex problems interpretation of data and synthesis of information to provide valid
conclusion.
5. Modern tool usage: An ability to adapt current technologies and use modern IT tools, to
design, formulate, implement and evaluate computer based system, process, by considering
the computing needs, limits and constraints.
6. The engineer and society: An ability of reasoning about the contextual knowledge of the
societal, health, safety, legal and cultural issues, consequent responsibilities relevant to IT
practices.
7. Environment and sustainability: An ability to understand the impact of engineering
solutions in a societal context and demonstrate knowledge of and the need for sustainable
development.
8. Ethics: An ability to understand and commit to professional ethics and responsibilities
and norms of IT practice.
9. Individual and team work :An ability to apply managerial skills by working effectively
as an individual, as a member of a team, or as a leader of a team in multidisciplinary projects.
10. Communication: An ability to communicate effectively technical information in speech,
presentation, and in written form
11. Project management and finance: An ability to apply the knowledge of Information
Technology and management principles and techniques to estimate time and resources needed
to complete engineering project.
12. Life-long learning: An ability to recognize the need for, and have the ability to engage in
independent and life-long learning.
Course Outcomes
1. CO1: Use algorithms on various linear data structure using sequential
organization to solve real lifeproblems.
2. CO2: Analyze problems to apply suitable searching and sorting algorithm to various
applications.
3. CO3: Analyze problems to use variants of linked list and solve various real life problems.
4. CO4: Designing and implement data structures and algorithms for solving different kinds of
problems
CO to PO Mapping:
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
1 1 2 1
CO1 - - - - - - - -
2 2 2 1
CO2 - - - - - - - -
CO3
- 2 1 1 - - - - - - - -
CO4 1 2 2 1 - - - - - - - -
CO to PSO Mapping:
2. Laboratory Objective
To understand basic techniques and strategies of algorithm analysis, the memory requirement for
various datastructures like array, linked list, stack, queue etc using concepts of python and C++
programming language
3. Laboratory Equipment/Software
Operating System recommended:- 64-bit Open source Linux or its derivative Programming
tools recommended: - Open Source Python, Programming tool like Jupyter Notebook, Pycharm,
Spyder, G++/GCC
List of Assignments
In second year computer engineering class, group A student‟s play cricket,
group B studentsplay badminton and group C students play football.
Write a Python program using functions to compute following: -
a) List of students who play both cricket and badminton
b) List of students who play either cricket or badminton but not both
1 c) Number of students who play neither cricket nor badminton
d) Number of students who play cricket and football but not badminton.
e) (Note- While realizing the group, duplicate entries should be avoided, Do not use
SET built- in functions)
3 e) Write a Python program for department library which has N books, write
functions for following:
a) Delete the duplicate entries
b) Display books in ascending order based on cost of books
c) Count number of books with cost more than 500.
d) Copy books in a new list which has cost less than 500.
4 Write a Python program to store first year percentage of students in array. Write
function for sorting array of floating point numbers in ascending order using
a) Selection Sort
b) Bubble sort and display top five scores.
5 Write a Python program to store second year percentage of students in array. Write
function for sorting array of floating point numbers in ascending order using :
a) Insertion sort
b) Shell Sort and display top five scores.
6 Write a Python program to store first year percentage of students in array. Write
function for sorting array of floating point numbers in ascending order using quick
sort and
display top five scores.
Department of Artificial Intelligence and Data Science Engineering, ADYPSOE 9
Subject Code: 217522 Subject Name: Data Structures Laboratory
SEM-I
Experiment No. 1
Aim:
Perform various set operations in python
Objective:
To understand the concept of array.
To understand various set operation using array and function.
To understand use of array data structure for set operations.
Problem Statement:
In second year computer engineering class, group A student‟s play cricket, group B
studentsplay badminton and group C students play football.
Write a Python program using functions to compute following: -
List of students who play both cricket and badminton
List of students who play either cricket or badminton but not both
Number of students who play neither cricket nor badminton
Number of students who play cricket and football but not badminton.
(Note- While realizing the group, duplicate entries should be avoided, Do not use SET
built- in functions)
Theory:
Set:
Definition: A set is any collection of definite, distinguishable objects, and we call these objects
the elements of the set.
Array:
Array is a data structure that can store a fixed-size sequential collection of elements of the same
type. An array is used to store a collection of data, but it is often more useful to think of an
Instead of declaring individual variables, such as number0, number1, ..., and number99, declare
one array variable such as numbers and use numbers[0], numbers[1], and ..., numbers[99] to
In single dimensional array we can represent all set which is required to perform various
set operations.
Operations on set:
Union of the sets A and B, denoted A ∪ B, is the set of all objects that are a member of A, or B,
or both. The union of {1, 2, 3} and {2, 3, 4} is the set {1, 2, 3, 4}. We can represents the above
set in terms of programming using array data structure as follows:
Intersection of the sets A and B, denoted A ∩ B, is the set of all objects that are
members of both A and B. The intersection of {1, 2, 3} and {2, 3, 4} is the set {2, 3} .
3. Difference of B minus A:
The difference of two sets B and A is the collection of objects in B that are not in A .
The compliment of a set A is the collection of objects in the universal set that are not
in A.
Department of Artificial Intelligence and Data Science Engineering, ADYPSOE 12
Subject Code: 217522 Subject Name: Data Structures Laboratory
SEM-I
Algorithm:
Algorithm for union of two set:
Algorithm Union(arr1[ ], arr2[ ])
For union of two arrays, follow the following procedure.
(Write your own algorithm/pseudocode)
Input:
Output:
Various operation of set is tested.
Union operation :
Set A : student who are playing cricket
11 12 13 15
Set B: student who are playing badminton
15 16 17 18
Union set:
11 12 13 15 16 17 18.
Conclusion:
Thus we have implemented pre-processing of a text document such as stop word removal,
stemming.
Outcome:
Upon completion of this experiment, students will be able to:
Experiment No. 2
Aim:
Perform different operations on array in python.
Objective:
Software Requirements:
Open Source Python, Programming tool like Jupyter Notebook, Pycharm, Spyder (64 bit)
Theory:
Data structure is:
data.
(a) Linear : Elements in linear data structure form a sequence. A linear data structure traverses
the data elements sequentially, in which only one data element can directly be reached.
(b) Non–Linear : If the elements of data structure do not form a sequence or a linear list
then data structure is called as Non–Linear data structure. eg. Trees , Graphs.
ARRAY:
An array:
length is determined when the array is created, and cannot be changed (static data
structure).
Position of element in an array defines index or subscript of particular element. Array index
always starts with zero. If the size of array is n then index ranges from 0 to n–1.
Array index must be integer or integer expression. There can be array of integer, floating
Index 0 1 2 3 4
Value 60 20 85 35 75
e.g.
The array type has a set of operations that can be applied uniformly to each of these values
indexed location
It‟s abstract because the implementation is hidden: all access is via the defined operations
Algorithm:
Algorithm to accept n student‟s marks:
1. Start
2. Read the marks of n students and stored in array (-1 for absent student)
6. Comparing all student‟s marks print mark scored by most of the students
8. Stop
Input:
Output:
Conclusion:
Thus, we implemented linear-static data structure (array) by storing marks of students in
an array.
Outcomes:
Experiment No. 3
Aim:
Write a Python program to store marks scored in subject “Fundamental of Data Structure”. Write
functions to compute following: Write a Python program for department library which has N
books, write functions for following:
d) Copy books in a new list which has cost less than 500.
Objective:
To study-
To understand the concept of data structure
To implement suitable data structures
To perform basic operations on data structure
Theory:
(Write your own algorithm/pseudocode)
Input:
Output:
Conclusion:
Thus, we implemented a library application and performed various operation
Outcomes:
Experiment No. 4
Aim:
Implementation of Selection sort and bubble sort in python
Objectives:
a) To understand the concept of sorting.
Problem Statement:
Write a Python program to store first year percentage of students in array. Write function for
sorting array of floating point numbers in ascending order using
a) Selection Sort
Theory :
Selection Sort:
Selection sort carries out a sequence of passes over the table. At the first pass an entry is selected
on some criteria and placed in the correct position in the table. The possible criteria for selecting
an element are to pick the smallest or pick the largest. If the smallest is chosen then, for sorting
in ascending order, the correct position to put it is at the beginning of the table.
Now that the correct entry is in the first place in the table the process is repeated on the
remaining entries. Once this has been repeated n-1 times the n-1 smallest entries are in the first
n-1 places which leaves the largest element in the last place. Thus only n-1 passes are required.
Bubble Sort:
Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent
Algorithm:
Conclusion : Thus, we implemented selection sort and bubble sort to sort the given array in
ascending order.
Experiment No. 5
Aim:
Implementation of insertion sort and shell sort in python
Objectives:
a) To understand the insertion sort.
Problem Statement:
Write a Python program to store second year percentage of students in array. Write function for
sorting array of floating point numbers in ascending order using :
a) Insertion sort
Theory :
Insertion Sort:
This is a in-place comparison based sorting algorithm. Here, a sub-list is maintained which is
always sorted. For
list, has to find its appropriate place and insert it there. Hence the name insertion sort.
The array is searched sequentially and unsorted items are moved and inserted into sorted sub-list
(in the same array).
This algorithm is not suitable for large data sets as its average and worst case complexity are of
Ο(n2) where n are no.
of items.
Shell Sort
The shell sort, improves on the insertion sort by breaking the original list
into a number of smaller sublists, each of which is sorted using an insertion sort. The unique way
that these sublists are chosen is the key to the shell sort. Instead of breaking
the list into sublists of contiguous items, the shell sort uses an increment i, sometimes called the
gap, to create a sublist by choosing all items that are i items apart.
The running time of Shellsort is heavily dependent on the gap sequence it uses. For many
Algorithm:
Conclusion : Thus, we implemented Insertion sort and Shell sort to sort the given array in
ascending order.
Experiment No. 6
Aim:
Implementation of quick sort in python
Objectives:
a) To understand quick sort
Problem Statement:
Write a Python program to store first year percentage of students in array. Write
function for sorting array of floating point numbers in ascending order using quick
Theory :
Quick Sort:
The basic version of quick sort algorithm was invented by C. A. R. Hoare in 1960 and formally
introduced quick sort in 1962. It is based on the principle of divideand- conquer. It has two
phases:
The quick sort partitions an array and then calls itself recursively twice to sort the resulting two
subarray. This algorithm is quite efficient for large sized data sets as its
average and worst case complexity are of O(nlogn) where n are no. of items.
Most of the work is done in the partition phase - it works out where to divide
the work. The sort phase simply sorts the two smaller problems that are generated in the
partition phase.
This makes Quicksort a good example of the divide and conquers strategy for
solving problems. This is similar in principle to the binary search. In the quicksort, we
divide the array of items to be sorted into two partitions and then call the quicksort
procedure recursively to sort the two partitions, i.e. we divide the problem into two
Algorithm:
The pseudocode can be described as follows:
Conclusion : Thus, we implemented quick sort the given array in ascending order.
Experiment No. 7
Aim:
Objectives:
a) To understand the concept of linked list data structure
b) To understand
Problem Statement:
Department of Computer Engineering has student's club named 'Pinnacle Club'. Students of
second, third and Similarly one may cancel the membership of club. First node is reserved for
president of club and last node is reserved for secretary of club. Write C++ program to maintain
club member„s information using singly linked list. Store student PRN and Name. Write
functions to:
1. Add and delete the members as well as president or even secretary.
2. Compute total number of members of club
3. Display members
4. Two linked lists exist for two divisions. Concatenate two lists.
Theory :
Linked List: A linked list is a linear data structure consisting of a group of nodes which together
represent a sequence. Under the simplest form, each node is composed of a data and a reference
(in other words, a link) to the next node in the sequence; more complex variants add additional
links. This structure allows for efficient insertion or removal of elements from any position in the
sequence. Each element (node) of a list comprises of two items reference/link to the next node.
The last node has a reference to NULL. The entry point into a linked list is called the head of the
list. It should be noted that head is not a separate node, but the reference to the first node. If the
list is empty then the head is a NULL reference.
Dynamic Memory:
In the programs, memory needs were determined before program execution by defining the
variables needed. But there may be cases where the memory needs of a program can only be
determined during runtime. For example, when the memory needed depends on user input. On
these cases, programs need to dynamically allocate memory, for which the C++ language
integrates the operators new and delete.
Operator new :
Dynamic memory is allocated using operator new. new is followed by a data type specifier
and, if a sequence of more than one element is required, the number of these within
Department of Artificial Intelligence and Data Science Engineering, ADYPSOE 27
Subject Code: 217522 Subject Name: Data Structures Laboratory
SEM-I
brackets [ ]. It returns a pointer to the beginning of the new block of memory allocated. Its syntax
is:
In this case, the system dynamically allocates space for five elements of type int and returns a
pointer to the first element of the sequence, which is assigned to ptr (an integer pointer).
Therefore, ptr now points to a valid block of memory with space for five elements of type int.
Operator delete:
In most cases, memory allocated dynamically is only needed during specific periods of
time within a program; once it is no longer needed, it can be freed so that the memory
becomes available again for other requests of dynamic memory. This is the purpose of
Algorithm:
Time Complexity:
Search: O(n)
Indexing: O(n)
If „m‟ then ask name, then delete member with given name from SLL (If member
Output:
Display student list (if deletion is successful)
or
Conclusion : Thus, we implemented linear-dynamic data structure singly linked list to store
students/members of student‟s club named „Pinnacle Club‟.
Experiment No. 8
Aim:
Objectives:
Problem Statement:
Second year Computer Engineering class, set A of students like Vanilla Ice-cream and set B of
students like butterscotch ice-cream. Write C++ program to store two sets using linked list.
Compute and display: Write C/C++ program to store two sets using linked list, compute and
display:
Theory:
Operations on set:
Definition: Let A and B be subsets of a set U.
Union of A and B: A B = {x U|x A or x B}
Union of the sets A and B, denoted A ∪ B, is the set of all objects that are a member of
A, or B, or both. The union of {1, 2, 3} and {2, 3, 4} is the set {1, 2, 3, 4}. We can
represent the above set in terms of programming using array data structure as follows:
A[ ]={1,2,3} and B[ ]={2, 3, 4}
Suppose C is set for storing union result.
So therefore union is C [ ] = {1, 2, 3, 4}.
Intersection of A and B: A B = {x U|x A and x B}
Intersection of the sets A and B, denoted A ∩ B, is the set of all objects that are
members of both A and B. The intersection of {1, 2, 3} and {2, 3, 4} is the set {2, 3}
. Intersection using array:
The difference of two sets B and A is the collection of objects in B that are not in A
. The difference is written B – A.
Complement of A: Ac = {x U|x A}
The compliment of a set A is the collection of objects in the universal set that are
not in A.
Linked List: A linked list is a linear data structure consisting of a group of
a) Insertion
b) Deletion −
c) Display −
Algorithm:
The pseudocode can be described as follows:
Time Complexity:
Insert / Delete at beginning: O(1)
Insert / Delete at end: O(n)
Search: O(n)
Indexing: O(n)
Enter Roll: 26
Likes Vanilla (yes=1 / no=0):1
Likes Butterscotch (yes=1 / no=0):0
Department of Artificial Intelligence and Data Science Engineering, ADYPSOE 31
Subject Code: 217522 Subject Name: Data Structures Laboratory
SEM-I
Enter Roll: 27
Likes Vanilla (yes=1 / no=0):0
Likes Butterscotch (yes=1 / no=0):1
Enter Roll: 28
Likes Vanilla (yes=1 / no=0):0
Likes Butterscotch (yes=1 / no=0):0
Set of students who like either vanilla or butterscotch or
both ={ 25, 26, 27}
Set of students who like both vanilla and
butterscotch ={ 25}
Number of students who like neither vanilla nor
butterscotch =1
Conclusion : Thus, we implemented linear-dynamic data structure singly linked list to store
two sets
and have performed various operations on it.
Experiment no.9
Aim: Implement Stack ADT in C++ using array
Objectives:
Theory :
Stack is a linear data structure which follows a particular order in which the operations are
performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out). In Stack all
Operations such as Insertion and Deletion are permitted at only one end called Top.
Push(): Adds an item in the stack. If the stack is full, then it is said to
be an Overflow condition.
Pop(): Removes an item from the stack. The items are popped in the
reversed order in which they are pushed. If the stack is empty, then it is said
to be an Underflow condition.
Department of Artificial Intelligence and Data Science Engineering, ADYPSOE 33
Subject Code: 217522 Subject Name: Data Structures Laboratory
SEM-I
Using array
Algorithm:
(Write your own algorithm/pseudocode)
Test Cases: Take following cases to check whether the string is palindrome or
not: 1. Input: Enter a sting: madam
Department of Artificial Intelligence and Data Science Engineering, ADYPSOE 34
Subject Code: 217522 Subject Name: Data Structures Laboratory
SEM-I
datastructureslaboratory
now check for palindrome,
Output: Sting is NOT a palindrome,
reverse of string is: yrotarobalserutcurtsatad
Experiment No. 10
Aim: Implement C++ program for expression conversion as infix to postfix and its
evaluation using stack.
Objective:
a) To understand the use of stack.
b) To understand expression conversion as infix to postfix using stack.
c) To understand postfix expression evaluation using stack.
Problem Statement:
Implement C++ program for expression conversion as infix to postfix and its evaluation
using stack based on given conditions
i. Operands and operator, both must be single character.
ii. Input Postfix expression must be in a desired format.
iii. Only '+', '-', '*' and '/ ' operators are expected.
Theory:
Stack is mainly used for expression conversion and expression evaluation purpose.
In any programming language, if we want to perform any calculation or to frame a condition
etc., we use a set of symbols to perform the task. These set of symbols makes an expression.
Based on the operator position, expressions are divided into three types. They are as
follows:
Infix Expression
Postfix Expression
Prefix Expression
Infix Expression
In infix expression, operator is used in between operands.
The general structure of an Infix expression is as follows...
Operand1 Operator Operand2
Example : a + b
Postfix Expression
In postfix expression, operator is used after operands. We can say that
"Operator follows the Operands".
The general structure of Postfix expression is as follows...
Operand1 Operand2 Operator
Example : a b +
Prefix Expression
In prefix expression, operator is used before operands. We can say that "Operands follows the
Operator".
Any expression can be represented using the above three different types of expressions. And
we can convert an expression from one form to another form like Infix to Postfix, Infix to
Prefix, Prefix to Postfix and vice versa.
Postfix Evaluation:
Postfix Expression: 82-34*22^/+
Applications:
Conclusion:
Thus, we implemented expression conversion as infix to postfix and its evaluation using stack.
Outcome:
Understanding the use of stack.
Questions:
1) What is expression?
Experiment No. 11
Aim: C++ program for simulating job queue.
Objective:
a) To understand the concept of queue.
Problem Statement:
Queues are frequently used in computer programming, and a typical example is the
creation of a job queue by an operating system. If the operating system does
not use priorities, then the jobs are processed in the order they enter the system.
Write C++ program for simulating job queue. Write functions to add job and delete
job from queue.
Theory:
Queue is a linear structure which follows a particular order in which the operations are
performed. The order is First In First Out (FIFO). A good example of queue is any queue
ofconsumers for a resource where the consumer that came first is served first.
The difference between stacks and queues is in removing. In a stack we remove the item the
most recently added; in a queue, we remove the item the least recently added.
Operations on Queue:
Mainly the following four basic operations are performed on queue:
if(isfull()) if(isempty())
return 0; return 0;
rear = rear + 1; int data = queue[front];
queue[rear] = data; front = front + 1;
return 1; return data;
Priority Queue is more specialized data structure than Queue. Like ordinary queue, priority
queue has same method but with a major difference. In Priority queue items are ordered by key
value so that item with the lowest value of key is at front and item with the highest value of
key is at rear or vice versa
A priority queue is used to handle the job queue of an operating system. So for the
implementation of jobs of operating system priority queue is used. As the jobs are assigned in
queue depending upon their priority
Application of Queue-Queue is used when things don‟t have to be processed immediately, but
have to be processed in First InFirst Out order like Breadth First Search. This property of Queue
makes it also useful in following kind of scenarios.
Dequeue Operation
(Write your own algorithm/pseudocode)
Applications:
Conclusion:
Thus, we implemented simulation of jobs using priority queue.
Outcome:
Questions:
Experiment No. 12
Aim: Deque implementation in C++.
Objective:
Problem Statement:
A double-ended queue (deque) is a linear list in which additions and deletions may
be made at either end. Obtain a data representation mapping a deque into a one-
dimensional array. Write C++ program to simulate deque with functions to add and
delete elements from either end of the deque.
Theory:
A deque, also known as a double-ended queue, is an ordered collection of items of similar types. It has
two ends, a front and a rear. It allows inserting and deleting from both ends means items can be added or
deleted from the front or rear end. Deque can be behave like a queue by using only enq_front and
deq_front , and behaves like a stack by using only enq_front and deq_rear
Double Ended Queue can be represented in two ways, those are as follows...
● Input Restricted Double Ended Queue
● Output Restricted Double Ended Queue
Test Cases: Insert and delete the element in queue from rear end or front end.
Menu driven program with four choice:
1. Insertion from rear end
2. Insertion from front end
3. Deletion from front end
4. Deletion from rear end
Input : Element to be inserted or deleted
Output : Successful implementation of operation(i.e. insertion or
deletion as per user choice)
Applications:
Input:
Output:
Conclusion:
Thus, we implemented various deque operations using array.
Outcome:
Understanding the concept of deque.
Experiment No. 13
Objective:
a) To study Circular Queue as data structure.
b) To understand implementation of Circular Queue and perform various operations on it.
Problem Statement:
Pizza parlor accepting maximum M orders. Orders are served in first come first served basis.
Order once placed cannot be cancelled. Write C++ program to simulate the system using
circular queue using array.
Theory:
Circular Queue
In a normal Queue Data Structure, we can insert elements until queue becomes full. But once if
queue becomes full, we can‟t insert the next element until al the elements are deleted from the
queue. For example consider the queue below:
This situation also says that Queue is Full and we can‟t insert the new element because, „rear‟ is
still at last position. In above situation, even though we have empty positions in the queue we
can‟t make use of them to insert new element. This is the major problem in normal queue data
structure. To overcome this problem we use circular queue data structure.
1. Place Order
2. Serve Order
3. Display Orders
4. Exit
Input:
Output:
Conclusion:
Thus, we implemented Circular Queue and perform various operations of it
Outcome:
Understanding the concept of circular queue.
Implement Circular Queue and perform various basic operations on it.
Questions:
1. What are the advantages of circular queue over linear queue.
2. Explain circular queue ADT.