DS Theory Assignment 2024 25
DS Theory Assignment 2024 25
ASSIGNMENT
Name of Student
Enrollment No.
CO and PSO
Course Outcome (CO)
Students will be able to:
Course CO Statement
Outcome
CO1 Define and classify various data structures, storage structures and common operations on
them
CO2 Create various linear data structures with their representation and perform different
operations on them
CO3 Create various nonlinear data structures with their representation and perform different
operations on them
CO4 Apply various searching sorting techniques on data set
CO5 Solve the given a problem using an appropriate data structure to achieve optimal
performance and compare its performance with other possible data structures
Name of Student
Enrollment No.
INDEX
Sr.No Title Date Grade Sign
1 Introduction to Data Structures
2 Array, Matrix, Stack, Queue and Linked List
3 Tree and Graph
4 Sorting and Searching
5 Hashing and File Organizations
INFORMATION TECHNOLOGY DEPARTMENT, CKPCET, Surat.
Q.2 Define data structure. List the various linear and non-linear data structures R
and explain them in brief with its applications .
0 2 0
0 0 3
a. 5 4 6 + * 4 9 3 / + *
b. 7 5 2 + * 4 1 1 + / -
c. 8 2 / 6 7 * +
Q.12 Trace the conversion of infix to postfix form in tabular form. E
a. ( A + B * C / D - E + F / G / ( H + I ) )
b. ( A + B ) * C + D / ( B + A * C ) + D
c. (A-B)/C*D^(E/F)^(G+H)
Q.13 Evaluate the prefix expression in tabular forms: E
a. * / - 8 2 3 4
Q.15 Write an algorithm for Double Ended Queue that insert an element at front U
end.
Q.16 Write an algorithm to implement ascending priority queue using singular A+U
linear linked list which has insert() function such that queue remains ordered
list. Also implement remove() function.
Q.17 Define queue. Write algorithms for INSERT, DELETE and DISPLAY U
operations of queue.
Q.18 Write algorithm to (i) insert, and (ii) delete elements in circular queue. A+U
Q.19 Write an advantage of link list , doubly link list and circular link list.
Q.26 Write user defined ‘C’ function to insert node at a specific location in singly A
linked list.
Q.27 Write user defined ‘C’ function to delete node from end in circular linked A
list.
Q.28 Write a ‘C’ program to implement queue using linked list. A
or
Write a ‘C’ program to implement stack using linked list.
Q.29 Write user defined ‘C’ function to insert node at the end in circular linked A
list.
Q.30 Write user defined ‘C’ function to delete node from a specific location in A
doubly linked list.
Q.31 What is the Tower of Hanoi? Explain it with n=3. U+E
INFORMATION TECHNOLOGY DEPARTMENT, CKPCET, Surat.
Q.2 What is a binary search tree? Create a binary search tree for the R+E
following data.14, 10, 17, 12, 10, 11, 20, 12, 18, 25, 20, 8, 22, 11, 23
Explain deleting node 20 in the resultant binary search tree.
Q.3 With a suitable example, explain steps for conversion of a general tree U
into a binary tree.
Q.4 How can a directed tree be represented? R
Q.5 Draw a Binary expression tree for the following and perform E
pre-order traversal: (A $ B $ C) + (D – E * F)
Q.6 Write recursive ‘C’ functions for (1) in-order (2) pre-order and U
(3) post-order traversals of binary search tree.
Q.7 Construct a binary search tree from the following traversals: E
In-order: 3, 4, 5, 6, 7, 9, 17, 20, 22
Pre-order: 9, 4, 3, 6, 5, 7, 17, 22, 20
Q.8 Construct a binary tree from the traversals given below: E
In-order: 1, 10, 11, 12, 13, 14, 15, 17, 18, 21
Post-order: 1, 11, 12, 10, 14, 18, 21, 17, 15, 13
Q.9 Explain AVL tree with an example. U
Q.4 Explain the difference between insertion sort and selection sort
U+N
with an example. What is the time complexity of these algorithms?
How?
Q.5 Sort following with Selection Sort Method : 20, 50, 30, 75, 90, 60, 25, 10, E
40
Q.6 Apply a merge sort algorithm for the following data and show the steps. E
66, 33, 40, 22, 55, 88, 11, 80, 20, 50, 44, 77, 30.
Q.7 Write a C program for bubble sort. E
Q.12 Apply quick sort for the following data: 9, 7, 5, 11, 12, 2, 14, 3, 10, 6 A+U
INFORMATION TECHNOLOGY DEPARTMENT, CKPCET, Surat.
Data Structures (3130702)
Assignment –V: Hashing and File Organizations
[Batch 1]
Q. Questions (Total Marks: 10) Level of
No Bloom’s
Taxonomy
Q.1 How do the following hash functions work? (i) The mid-square method U
(ii) Digit analysis
Q.2 Explain Sequential file organizations and list its advantages R+U
and disadvantages.
Q.3 What is hashing? What are the qualities of a good hash function? Explain R+U
any two hash functions in detail.