0% found this document useful (0 votes)
63 views

21CS302 - Data Structures - Lab

The document outlines 10 experiments related to data structures and algorithms in C programming. The experiments cover topics such as arrays, structures, stacks, queues, linked lists, trees, hashing, and more. Specific tasks include creating and manipulating various data structures, evaluating postfix expressions, converting infix to postfix notation, and implementing hash tables. The document provides details on the required operations and functionality for each experiment.

Uploaded by

Pinky Bhai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

21CS302 - Data Structures - Lab

The document outlines 10 experiments related to data structures and algorithms in C programming. The experiments cover topics such as arrays, structures, stacks, queues, linked lists, trees, hashing, and more. Specific tasks include creating and manipulating various data structures, evaluating postfix expressions, converting infix to postfix notation, and implementing hash tables. The document provides details on the required operations and functionality for each experiment.

Uploaded by

Pinky Bhai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

(ISO 9001:2015 Certified)Accredited with

‘A’ Grade by NAAC


.Department of Computer Science & Engineering.

Experiment List

1. Design, Develop and Implement a menu driven Program in C for the following
a) To create an Array of N Integer Elements and store n values.
 Inserting an Element (ELEM) at a given valid Position (POS)
 Deleting an Element at a given valid Position POS)
 Display of Array Elements
 Exit.
Support the program with functions for each of the above operations.

b) To create student structure with fields Roll No, Name, Semester, marks in 3 subjects. And
Write functions to
 Enter 5 students’ details and display the same using pointer to structure
 Find Student wise and subject wise total marks and display the same.

2. Design, Develop and Implement a menu driven Program in C for the following operations on
a) STACK of Integers (Array with structure Implementation of Stack with size MAX)
 Push an Element on to Stack.
 Pop an Element from Stack.
 Demonstrate Overflow and Underflow situations on Stack.
 Display the status of Stack .
 Exit
b) Queue of Integers (Array with structure Implementation of Queue with size MAX)
 Insert an Element in to Queue.
 Delete an Element from Queue.
 Demonstrate Overflow and Underflow situations on Queue.
 Display the status of Queue .
 Exit

Support the program with appropriate functions for each of the above operations

3. Design, Develop and Implement a Program in C for the following Stack Applications
 Evaluation of Suffix expression with single digit operands and operators: +, -, *, /, %, ^
b
 Solving Tower of Hanoi problem with n disks

4. Design, Develop and Implement a Program in C for converting an Infix Expression to Postfix
Expression. Program should support for both parenthesized and free parenthesized expressions
with the operators: +, -, *, /, % (Remainder), ^ (Power) and alphanumeric operands

LessonPlan-21CS302 AcademicYear2022-23 1
(ISO 9001:2015 Certified)Accredited with
‘A’ Grade by NAAC
.Department of Computer Science & Engineering.

5. Design, Develop and Implement a menu driven Program in C for the following operations on
Circular QUEUE of Characters (Array Implementation of Queue with maximum size MAX)
 Insert an Element on to Circular QUEUE.
 Delete an Element from Circular QUEUE.
 Demonstrate Overflow and Underflow situations on Circular QUEUE d. Display the
status of Circular QUEUE.
 Exit
Support the program with appropriate functions for each of the above operations

6. Design, Develop and Implement a menu driven Program in C for the following operations on
Singly Linked List (SLL) of Student Data with the fields:
USN, Name, Program, Sem, PhNo
 Create a SLL of N Students Data by using front insertion.
 Display the status of SLL and count the number of nodes in it.
 Demonstration of stack
 Demonstration of Queue.
 Exit

7. Design, Develop and Implement a menu driven Program in C for the following operations on
Doubly Linked List (DLL) of Employee Data with the fields: SSN, Name, Dept, Designation,
Sal, PhNo
 Create a DLL of N Employees Data by using end insertion.
 Display the status of DLL and count the number of nodes in it.
 Perform Insertion and Deletion at End of DLL.
 Perform Insertion and Deletion at Front of DLL.
 Demonstrate how this DLL can be used as Double Ended Queue.
 Exit

8. Design, Develop and Implement a Program in C for the following operations on Singly Circular
Linked List (SCLL) with header nodes
 Represent and Evaluate a Polynomial P(x,y,z) = 6x2 y 2 z-4yz5 +3x3 yz+2xy5 z-2xyz3 and
display the same.

9. Design, Develop and Implement a menu driven Program in C for the following operations on
Binary Search Tree (BST) of integers .
 Create a BST of N Integers: 6, 9, 5, 2, 8, 15, 24, 14, 7, 8, 5, 2.
 Traverse the BST in Inorder, Preorder and Post Order.
 Search the BST for a given element (KEY) and report the appropriate message.
 Exit

LessonPlan-21CS302 AcademicYear2022-23 1
(ISO 9001:2015 Certified)Accredited with
‘A’ Grade by NAAC
.Department of Computer Science & Engineering.

10. Given a File of N employee records with a set K of Keys (4-digit) which uniquely determine the
records in file F. Assume that file F is maintained in memory by a Hash Table (HT) of m
memory locations with L as the set of memory addresses (2-digit) of locations in HT. Let the
keys in K and addresses in L are Integers.
 Design and develop a Program in C that uses Hash L as H(K)=K mod m (remainder
method), and implement hashingfunction H: K technique to map a given key K to the
address space L. Resolve the collision (if any) using linear probing

LessonPlan-21CS302 AcademicYear2022-23 1

You might also like