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

DSC Lab

Uploaded by

Gaurav Scribd
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

DSC Lab

Uploaded by

Gaurav Scribd
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Course Title: Data Structures Lab

Subject Code : 19CSL32 Credits : 1 CIE: 50


Number of Lecture Hours/Week 3 Hrs (Practical) SEE: 50
SEE Hours: 03
Prerequisite: C Language : Functions and Pointers
Course Objectives :
1. To study the working of data structures such as stacks, queues, trees, hash tables,
search trees.
2. To choose the appropriate data structure for a specified application.
3. To learn various searching and sorting algorithms.
1. Design, Develop and Implement a menu driven Program in C for the
following Array operations
a. Creating an Array of N Integer Elements
b. Display of Array Elements with Suitable Headings
c. Inserting an Element (ELEM) at a given valid Position (POS)
d. Deleting an Element at a given valid Position(POS)
e. Exit.
Support the program with functions for each of the above operation.

2. Design, Develop and Implement a program in C for thefollowing


operations on Strings
a. Read a Main String (STR), a Pattern String (PAT) and a
Replace String (REP).
b. Perform Pattern Matching Operation: Find and Replace all
occurrences of PAT in STR with REP if PAT exists in STR. Repost
suitable messages in case PAT does not exist in STR.
Support the program with functions for each of the above operations. Don‟t
use built-in functions.

3. Design, Develop and Implement a menu driven Program in C for the


following operations on STACK of Integers (Array Implementation of
Stack with maximum size MAX)
a. Push an Element on to Stack
b. Pop an Element from Stack
c. Display the status of Stack
d. Demonstrate Overflow and Underflow situations on Stack
e. Exit

Support the program with appropriate functions for each of the above
operations.
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.

5. Design, Develop and Implement a Program in C


for the following Stack Applications
a. Evaluation of Suffix expression with
single digitoperands and operators: +, -,
*, /, %, ^
b. Solving Tower of Hanoi problem with n disks

6. Design, Develop and Implement a menu driven


Program in C for the following operations on
QUEUE of Characters (Array Implementation of
Queue with maximum size MAX)
a. Insert an Element on to QUEUE
b. Delete an Element from QUEUE
c. Demonstrate Overflow and Underflow situations on QUEUE
d. Display the status of QUEUE
e. Exit
Support the program with appropriate functions for
each of the above operations.

7. Design, Develop and Implement a menu driven


Program in C for the following operations on
Singly Linked List (SLL) of integer values
a. Create a SLL of N integers by using front insertion.
b. Display the status
of SLL and count the
number of nodes in it
c. Perform Insertion and Deletion at End of SLL
d. Perform Insertion and Deletion at Front of SLL
8. Design, Develop and Implement Program in
C to Reverse a Singly Linked List (SSL) of a
given integers.
9. Design, Develop and Implement a menu driven
Program in C for the following operations on
Priority Queue.
a. Create a Priority queue by using Insert function.
b. Insertion data and Priority values as Input.
c. Perform Deletion operation.
d. Display the elements of Priority queue.
10. Design, Develop and Implement a Program in C for the following
operations on Binary Search Tree(BST) of Integers
a. Create a BST of N integers: 6,9,5,2,8,15,24,14,7,8,5,2.
b. Traverse the BST in Inorder
c. Traverse the BST in Preorder
d. Traverse the BST in Postorder

11. 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 function H: K ®L as H(K)=K mod m
(remainder method), and implement hashing technique to map a given
key K to the address space L. Resolve the collision (if any) using
linear probing

Course outcomes:
On completion of the course, the student will have the ability to:
Course CO # Course Outcome (CO) Blooms
Code Level
CO1 Design and develop various data structure using C5
pointers , dynamic memory allocation and recursion
CO2 Demonstrate basic operations on linked list using C2
suitable data structures.
CO3 Illustrate the implementation of different sorting and C2
19CSL32
searching techniques.
CO4 Construct Binary trees and binary search trees C2
CO5 Write a well organized laboratory report presenting the results in a P6
clear way using algorithms and obtained
output.

You might also like