0% found this document useful (0 votes)
16 views3 pages

DDS(2022S)

Dds paper

Uploaded by

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

DDS(2022S)

Dds paper

Uploaded by

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

lOMoARcPSD|34553825

203105205 4242 Question Paper

B.tech CSE (Parul University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Shruti Sharma ([email protected])
lOMoARcPSD|34553825

Seat No: ______________ Enrolment No: ____________________


PARUL UNIVERSITY
FACULTY OF ENGINEERING & TECHNOLOGY
B.Tech. Summer 2021 - 22 Examination
Semester: 3 Date: 21/04/2022
Subject Code: 203105205 / 03105203 Time: 2:00pm to 4:30pm
Subject Name: Data Structure and Algorithms / Data Structure Total Marks: 60
Instructions:
1. All questions are compulsory.
2. Figures to the right indicate full marks.
3. Make suitable assumptions wherever necessary.
4. Start new question on new page.

Q.1 Objective Type Questions - (Each of one mark) (15)


1. What is Time Complexity of Bubble sort in worst case?
(a) O(n) (c) O(log n)
(b) O(n2) (d) O(2n)
2. The keys 25,77,91,45,87,92,85,97 and 64 are inserted into an initially empty hash table of
length 10 using open addressing with hash function h(k)=k mod 10 and linear probing. Count
the number of collisions.
(a) 7 (c) 10
(b) 8 (d) 9
3. For any undirected graph G(V,E) where V represent vertices and E represent edges, the sum
of the degrees of all vertices is
(a) E (c) 2E
(b) V (d) 2V
4. In worst case, the number of comparisons needed to search a single linked list of length n for
a given element is
(a) n (c) log n
(b) n/2 (d) 2n-1
5. A Binary tree has 30 leaves. How many number of nodes will be there in three having two
children?
(a) 28 (c) 31
(b) 32 (d) 29
6. Enqueue() operation is used to ______________ elements in the Queue.
7. State True/False: Arrays have better cache locality that can make them better in terms of
performance.
8. Mention any two Non linear Data Structures.
9. To implement Queue data structure using stacks, minimum numbers of stacks required are
______
10. State True/False: Linear Search is better than Binary Search.
11. What will be the value of Front and Rear pointers when Queue is empty?
12. Which data structure is used in Depth First Search of a Graph?
13. How many number of ways are there by which the numbers 11, 12, 13,14,15,16,17 can
be inserted in an empty binary search tree, such that the resulting tree has height 6?
14. Which Data Structure is used to convert prefix expression to infix expression?
15. The height of a binary tree is the maximum number of edges in any root to leaf path. The
maximum number of nodes in a binary tree of height n are?
Q.2 Answer the following questions. (Attempt any three) (15)
A) Explain Asymptotic Notations in detail.
B) Write an algorithm to perform insertion operation and deletion operation in circular queue.
C) Write a short note on AVL tree. Explain any two rotation techniques.
D) What is hashing? Explain any four hash functions with example.

Page 1 of 2

Downloaded by Shruti Sharma ([email protected])


lOMoARcPSD|34553825

Q.3 A) Write an algorithm for circular link list for (1) Insertion of a node at any given position (07)
(2) Deletion of the node at the end.
B) Write a recursive function for Tower of Hanoi problem. Show the steps for disk n=3. (08)
OR
B) Write an algorithm for simple link list for (1) Deletion of a node at any given position (08)
(2) Insertion of the node at the end.
Q.4 A) Examine the algorithm for Insertion sort and sort the following array: (07)
25,75,85,98,80,30,15,100,95
OR
A) Write Merge Sort algorithm. Apply the algorithm to the following elements: (07)
10,5,28, 7, 39, 310, 55,15,1
B) Discuss algorithm of Breadth First Search (BFS) traversal for a Graph. Explain with an (08)
example.

Page 2 of 2

Downloaded by Shruti Sharma ([email protected])

You might also like