0% found this document useful (0 votes)
63 views

Bcs301 Data Structure

Data structure ylrkhz zkvzkhxkhdmb jl h lbxkvz

Uploaded by

ssingh.royal0
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)
63 views

Bcs301 Data Structure

Data structure ylrkhz zkvzkhxkhdmb jl h lbxkvz

Uploaded by

ssingh.royal0
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

Printed Page: 1 of 2

Subject Code: BCS301


0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM III) THEORY EXAMINATION 2023-24
DATA STRUCTURE
TIME: 3HRS M.MARKS: 70

Note: 1. Attempt all Sections. If require any missing data; then choose suitably.
SECTION A

1. Attempt all questions in brief. 2 x 7 = 14


Q no. Question Marks CO
a. What are the various asymptotic notations? 2 1
b. Why are parentheses needed to specify the order of operations in infix 2 2
expressions but not in postfix operations?
c. How the choice of pivot element effects the running time of quick sort 2 3
algorithm?
d. What are the 2 different forms of hashing? 2 3
e. What is the significance of binary tree in Huffman algorithm? 2 4
f. What is the number of edges in a regular graph of degree d and n vertices. 2 5
g. Write an algorithm to obtain the connected components of a graph. 2 5
SECTION B

2. Attempt any three of the following: 7 x 3 = 21


90

2
13
a. Write a Pseudo code that will concatenate two linked lists. Function should 7 1
_2

2.
have two parameters, pointers to the beginning of the lists and the function
P2

24
should link second list at the end of the first list.
b. Write an algorithm to convert a valid arithmetic infix expression into an 7 2
4D

5.
equivalent postfix expression. Trace your algorithm for following infix
.5
P2

expression.
17
A+B*C-D/F
Q

|1

c. What are the disadvantages of linear probing in hashing? Discuss how 7 3


quadratic probing can be used to solve some of these problems.
6

d. Write C function for non-recursive post order traversal. 7 4


5
0:

e. Consider the following graph and using Dijkstra Algorithm find the shortest 7 5
:2

path.
13
4
02
-2
03
6-
|1

SECTION C
3. Attempt any one part of the following: 7x1=7
a. Each element of an array Data [20][50] requires 4 bytes of storage. Base 7 1
address of Data is 2000. Determine the location of Data [10][10] when the
array is stored as:
(i) Row major
(ii) Column major

1|Page
QP24DP2_290 | 16-03-2024 13:20:56 | 117.55.242.132
Printed Page: 2 of 2
Subject Code: BCS301
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM III) THEORY EXAMINATION 2023-24
DATA STRUCTURE
TIME: 3HRS M.MARKS: 70

b. How will you create link list representation of a polynomial. Explain it with 7 1
the suitable example.
4. Attempt any one part of the following: 7x1=7
a. Write an algorithm to evaluate an arithmetic expression using stack and show 7 2
how the expression 3*(5-3) will be evaluate.
b. A double ended Queue (deque) is a linear list in which additions may be made 7 2
at either end. Obtain a data representation mapping a deque into one
dimensional array. Write C function to add and delete elements from either
end of deque.
5. Attempt any one part of the following: 7x1=7
a. Write a C program for sorting 100 integer numbers wring selection sort 7 3
procedure. Discuss the worst-case time complexity of the algorithms.
b. Write a program in C language to implement binary search algorithm. Also 7 3
discuss the average behavior of the algorithm.
6. Attempt any one part of the following: 7x1=7
90
a. If E and I denotes the external and internal path length of a binary tree having 7 4

2
13
n internal nodes then show that E=I+2n.
_2

b. Suppose character a, b, c, d,e,f has probabilities 0.07, 0.09, 0.12, 0.22, 0.23, 7 4

2.
P2

0.27 respectively. Find an optional Huffman code and draw the Huffman tree.

24
What is the average code length?
4D

5.
7. Attempt any one part of the following: 7x1=7
.5
P2

a. Find the minimum spanning tree using Prim’s algorithm for the graph shown 7 5
17
Q

below: -
|1
5 6
0:
:2
13
4
02

b. Write a program in C language to compute the indegree and outdegree of 7 5


-2

every vertex of a directed graph when the graph is represented by an


03

adjacency matrix.
6-
|1

2|Page
QP24DP2_290 | 16-03-2024 13:20:56 | 117.55.242.132

You might also like