0% found this document useful (0 votes)
14 views2 pages

Btcs4 3: V Semeste Exam Nation Ece Be 2 23 B Ec Ee MX

Uploaded by

failure568
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)
14 views2 pages

Btcs4 3: V Semeste Exam Nation Ece Be 2 23 B Ec Ee MX

Uploaded by

failure568
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/ 2

Total No. of Questions: 05 Total No.

of Printed Pages: 02
Roll No. _
BTCS403
V Semester Examination, December - 2023
B.Tech. (Ee, EI, MX)

Data Structures and Algorithms


Choice Based Credit System (CBCS)
Time: 3 Hrs. Maximum Marks: 60
Minimum Pass Marks: 24

Note: 1) All questions carry equ marks, out of which part 'A' and '8' carry 3 marks and part 'C' carries 6 marks.
2) From each question, part 'A' and '8' are compulsory and part 'C' has internal choice.
3) Draw neat diagram, wherever necessary.
4) Assume suitable data wherever necessary.

Q.1 (A) What is data structure? Differentiate between primitive and non-primitive data
structures. 03
(8) What is meant by the complexity of an algorithm? How do you determine its time
complexity? 03
(C) What is an array, and briefly describe the types of arrays? How is a two-
dimensional array represented in memory? 06
OR
What is sparse matrix? Write a C program to add two sparse matrices and explain
the assumed data structure. "I

Q.2(A) Describe the process of dynamic memory allocation and de-allocation for a linked
list. 03

(8) How does a circular linked list differ from a doubly linked list in terms of structure
and functionality? 03
(C) Explain linked list with an example. What are the benefits of using linked list over
array? How can you insert and delete a node in a singly linked list? 0'3
OR
Explain the structure of doubly linked list (Dll). Differentiate between a Dll and
doubly circular linked list (DCll). Explain the procedures to insert a node in Dll
at the beginning and at the last.

Q.3(A) What is a priority queue? Implement using a linked list. 03


(8) Explain recursion with an example. Why is recursion required? 03
Contd ...

1
(C) What is a stack, and why is it called LIFO? How can you use a stack to convert an
infix expression to postfix? Convert the infix expression D + (((F-C) * (A-E) + B)/H)
A (G-I) to postfix using a stack. 06
OR
Define a Queue as an Abstract Data Type (ADT) and explain its key
characteristics. Describe its primitive operation on array implementation and linked
list implementation. Implement queue using C.

Q.4(A) What are the differences between depth first search (DFS) and breadth first
search (BFS)?
(8) Explain Kruskal's algorithm with an example.
(C) What is a binary tree? A binary tree T has 12 nodes. The in-order and pre-order
traversals of T yield the following sequence of nodes:
In-order: D P 0 A B R J V K N T M
Pre-order: J P D BOA RTV KNM
Construct the Binary tree T showing each step. Explain, how you can arrive at a
solution in brief? 06
OR
Explain the concept of a height-balanced tree. Write an algorithm to insert a node
in a non-empty AVL tree. Construct an AVL from the data given below:
10, 20, 30, 25, 27, 7, 4, 23, 26, 21. ..,

Q.S(A) Differentiate between stable and unstable sorting algorithms. Provide examples of
each. 03
(8) Explain merge sort with an example. Discuss the key advantages and
disadvantages of merge sort. 03
(C) Describe the concept of the divide-and-conquer algorithm and illustrate the
process of the quick sort algorithm with the following array of numbers: (75, 54,
21, 43, 5, 20, 9, 56, 38, 24). Calculate the intermediate steps, showing how the
array is partitioned and sorted. Finally, discuss the time complexity of the quick
sort algorithm. 06
OR
Write short notes on (any two):
I. Selection Sort II. Radix Sort III. Heap Sort

You might also like