Cs3311-Set 4

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

B.E/B.Tech.

PRACTICAL END SEMESTER EXAMINATIONS, NOVEMBER/DECEMBER 2022

Third Semester

CS3311 – DATA STRUCTURES LABORATORY

(Regulations 2021)

Time: 3 Hours (Answer any one Question) Max.Marks: 100

Aim and Program Execution Viva-voce Record Total


Algorithm/ and Results
Procedure
20 30 30 10 10 100

1. Write a c program to implement the following operations for Stack ADT using Array
implementation

i) Insert ii) Delete iii) Display

2. Write a C program to search an existing element in a singly linked list.

3. Write a C program to implement linear queue using linked list method.

4. Write a C program to implement the polynomial manipulation for

5x + 3y, 4x – 4y + z and -3x + 5y + 2z.

5. Write a C program to implement infix to postfix and prefix conversion for the following

i) A*B+C ii) X/Y *Z iii) P +Q *R-S

6. Construct AVL tree for the following data 21,26,30,9,4,14,28,18,15,10,2,3,7 by using C


implementation.
7. Using Dijkstra’s Algorithm, find the shortest distance from source vertex ‘S’ to remaining
vertices in the following graph-

8. Write a C program to implement Prim’s Algorithm for suitable example.

9. Find the element 41 from the given list, by implementing sequential search algorithm in C
language,

11 Write a C programs for implementing the following sorting methods to arrange a

list of integers in ascending order:

a) Insertion sort b) Merge sort

12 i)Write a C program to implement selection sort for the given array

arr[] = {64, 25, 12, 22, 11}.

ii)Write a C program to implement merge sort for the {38, 27, 43, 3, 9, 82, 10}
13 i)Write a C program to implement LIFO structure, using array implementation.

ii)Write a C program to find an element in a list by using sequential order.

14 Write a C program to implement List ADT using linked list method to perform the following

a) Create a Linked list with the elements 10,25,46,59


b) Insert 30 after 22
c) Delete the element 22 from the list
d) In end of the Every above the operation Display all the elements.

15. Write a C program to implement binary search tree for the following operations

a) Create a BST with the elements 11,22,5,19,17,10


b) Insert a node with the element 7
c) Delete the element 10
d) Display the element of the BST in preorder.

16 Write a C program to implement any one of the hashing technique.

17 Write a C program to implement circular queue data structures using array implementation.

18 Write a C program to implement singly linked list to perform the following operations

i) Creation
ii) Insertion
iii) Deletion
19 Construct the minimum spanning tree (MST) for the given graph using Prim’s Algorithm-

20 Write a C program to sort the given unsorted array of elements using insertion sort
{12,31,25,8,32,17}

You might also like