Ds&algorithm Ia2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

DATE: 17.10.

24
ANNAPOORANA ENGINEERING COLLEGE,SALEM
(An AUTONOMOUS Institution)

B.E./B.Tech, M.E.- DEGREE INTERNAL EXAMINATION - I, NOV./DEC.- 2024


Semester III
INFORMATION TECHNOLOGY
22IT301- Data Structures And Algorithms
Regulations - 2022
Time : 1.30 Hours Maximum : 50 Marks
PART – A (8 x 1 = 8 Marks) Multiple Choice Questions
Q.No. CO BTL
Answer All Questions
1. A stable sorting algorithm that operates with O(n log n) complexity is:
CO3 K1
a) Merge Sort b) Quick Sort c) Heap Sort d) Selection Sort
2. State the sorting algorithm which is the most efficient for a nearly sorted array?
CO3 K1
a) Insertion Sort b) Heap Sort c) Quick Sort d) Merge Sort
3. ______ is the time complexity of binary search in the worst case
CO3 K2
a) O(1) b) O(log n) c) O(n) d) O(n2)
4. If several elements are competing for the same bucket in the hash table______
CO3 K1
a) Diffusion b) Replication c) Collision d) Duplication
5. Select maximum number of children a node in a binary tree can have
CO4 K1
a) 1 b) 2 c) 3 d) 4
6. Which traversal technique is used in a breadth-first search (BFS) of a tree?
a) Preorder traversal b) Inorder traversal CO4 K1
c) Level order traversal d) Postorder traversal
7. In a binary tree, if a node has two children, how many children must the sibling
of this node have? CO4 K2
a) 0 b) 1 c) 2 d) Either 0, 1, or 2
8. Choose the minimum height of a binary tree with n nodes
CO4 K1
a) log(n) b) log(n+1) c) log(n) + 1 d) log2(n+1) - 1
Q.No. PART- B (4×3 = 12 Marks)
CO BTL
Answer All Questions
9. Specify the time complexity of different sorting algorithm. CO3 K3
10. Define Hashing. CO3 K1
11. Write the in-order, pre-order and post-order for the given tree.

CO4 K3

12. List out the applications of binary tree CO4 K4


PART – C (2 X 15 = 30 Marks)
Q.No. Answer All Questions (Marks split up may be 15 / 10+5 / 8 + Marks CO BTL
7 )
Write an algorithm to implement insertion sort with suitable
13. (a) (i) 8 CO3 K3
example.
(ii) Implement selection sort with suitable example. 7 CO3 K4

(Or)
Given the input { 4371, 1323, 6173, 4199, 4344, 9679, 1989
} and a hash function of h(X)=X (mod 10) show the
(b) (i) resulting: 8 CO3 K5
a. Separate Chaining hash table
b. Open addressing hash table using linear probing
(ii) Describe the techniques to overcome hash collision. 7 CO3 K4
Construct an expression tree for the expression (a+b*c) +
14. (a) (i) ((d*e+f)*g). Give the outputs when you apply in order, 8 CO4 K6
preorder and post order traversals.
Create a binary search tree for the following numbers start
from an empty binary search tree. 45,26,10,60,70,30,40
(ii) 7 CO4 K6
Delete keys 10,60 and 45 one after the other and show the
trees at each stage
(or)
Define Tree. Explain the tree traversals with algorithms and
(b) (i) 8 CO4 K1
examples
(ii) Construct AVL tree ADT with own examples . 7 CO4 K6
Table of Specification

LOTS HOTS
Blooms Remembering Understanding Applying Analyzing Evaluating Create Total
(K1) (K2) (K3) (K4) (K5) (K6)
Marks 17 2 14 17 8 22 80
% 21.25 2.5 17.5 21.25 10 27.5 100

Prepared by HoD

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy