Btech Oe 4 Sem Basic Data Structure Algorithms Koe 045 2023
Btech Oe 4 Sem Basic Data Structure Algorithms Koe 045 2023
Btech Oe 4 Sem Basic Data Structure Algorithms Koe 045 2023
B.TECH.
(SEM IV) THEORY EXAMINATION 2022-23
BASIC DATA STRUCTURE & ALGORITHMS
Time: 3 Hours Total Marks: 100
Note: Attempt all Sections. If require any missing data; then choose suitably.
SECTION A
2
13
_2
2.
SECTION B
P2
24
2. Attempt any three of the following: 10x 3 = 30
3E
5.
(a) Assume the declaration of multi-dimensional arrays A and B to be,
.5
P2
(ii) Find the address of element B (2, 2, 3), assuming Base address of B =400 and
|1
there are W=4 words per memory location.
6
(b) Define Stack? Write a C program for array implementation ofa stack.
:1
(c) Write an algorithm for Insertion Sort. Use Insertion sort algorithm, sort the
26
following elements:
2, 8, 7, 1, 3, 5, 6, 4.
:
13
(d) Write the Dijkstra algorithm for shortest path in a graph and also discuss with the
help of suitable example.
3
SECTION C
3-
|0
90
2
13
_2
2.
P2
24
3E
5.
.5
P2
17
Q
(b) Write down the Floyd Warshall algorithm to solve the all pair shortest path.
|1
Use the Floyd Warshall algorithm to find shortest path among all the vertices in
the given graph:
6
:1
: 26
13
3
02
-2
10,20,35,40,50,60,75,80,95
Assume that the order of the B
B-tree is 3.
(b) Write short note on the following:
(i) Internal and External Sorting
(ii) B+ tree